Last change
on this file was 100, checked in by ruud, 22 months ago |
python installs also wheel to avoid error messages
|
File size:
637 bytes
|
Rev | Line | |
---|
[100] | 1 | import traceback
|
---|
| 2 | import unittest
|
---|
| 3 |
|
---|
| 4 | from geniusweb.actions.PartyId import PartyId
|
---|
| 5 | from geniusweb.protocol.ProtocolException import ProtocolException
|
---|
| 6 |
|
---|
| 7 |
|
---|
| 8 | class ProtocolExceptionTest(unittest.TestCase):
|
---|
| 9 | def testConstructor(self):
|
---|
| 10 | party = PartyId("test")
|
---|
| 11 | try:
|
---|
| 12 | x=1/0
|
---|
| 13 | except Exception as e:
|
---|
| 14 | err = ProtocolException("div by zero", party, e)
|
---|
| 15 |
|
---|
| 16 | print(err) # BUG ? FEATURE? this does NOT show the cause nor the stacktrace...
|
---|
| 17 | self.assertTrue(err)
|
---|
| 18 | self.assertTrue(err.__cause__)
|
---|
| 19 |
|
---|
| 20 | def testNullParty(self):
|
---|
| 21 | ProtocolException("test",None, None)
|
---|
| 22 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.