blob: d39a28707717c2cae46b199e31d1ef1439b8c6a8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import sys
import unittest
import SCons.Errors
class ErrorsTestCase(unittest.TestCase):
def test_InternalError(self):
"""Test the InternalError exception."""
try:
raise SCons.Errors.InternalError, "test internal error"
except SCons.Errors.InternalError, e:
assert e.args == "test internal error"
def test_UserError(self):
"""Test the UserError exception."""
try:
raise SCons.Errors.UserError, "test user error"
except SCons.Errors.UserError, e:
assert e.args == "test user error"
if __name__ == "__main__":
suite = unittest.makeSuite(ErrorsTestCase, 'test_')
if not unittest.TextTestRunner().run(suite).wasSuccessful():
sys.exit(1)
|