diff options
author | Walter Dörwald <walter@livinglogic.de> | 2003-05-01 13:12:34 (GMT) |
---|---|---|
committer | Walter Dörwald <walter@livinglogic.de> | 2003-05-01 13:12:34 (GMT) |
commit | 90437c03f2215acebffec9669316b40d46bd9757 (patch) | |
tree | 16ed309b26749b844939c19743ca810dcefd1565 /Lib/test/test_bool.py | |
parent | 1869ec5cb71cd6af1c495d136b1ee5aaaebf9fbb (diff) | |
download | cpython-90437c03f2215acebffec9669316b40d46bd9757.zip cpython-90437c03f2215acebffec9669316b40d46bd9757.tar.gz cpython-90437c03f2215acebffec9669316b40d46bd9757.tar.bz2 |
Consistently use test_support.foo everywhere.
Remove the last use of veris().
Remove now useless imports and functions.
Diffstat (limited to 'Lib/test/test_bool.py')
-rw-r--r-- | Lib/test/test_bool.py | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/Lib/test/test_bool.py b/Lib/test/test_bool.py index fe99b85..aa05944 100644 --- a/Lib/test/test_bool.py +++ b/Lib/test/test_bool.py @@ -5,16 +5,6 @@ from test import test_support import os -from test.test_support import verbose, TestFailed, TESTFN, vereq, have_unicode - -def veris(a, b): - if a is not b: - raise TestFailed, "%r is %r" % (a, b) - -def verisnot(a, b): - if a is b: - raise TestFailed, "%r is %r" % (a, b) - class BoolTest(unittest.TestCase): def assertIs(self, a, b): @@ -217,7 +207,7 @@ class BoolTest(unittest.TestCase): self.assertIs("xyz".startswith("x"), True) self.assertIs("xyz".startswith("z"), False) - if have_unicode: + if test_support.have_unicode: self.assertIs(unicode("xyz", 'ascii').endswith(unicode("z", 'ascii')), True) self.assertIs(unicode("xyz", 'ascii').endswith(unicode("x", 'ascii')), False) self.assertIs(unicode("xyz0123", 'ascii').isalnum(), True) @@ -256,12 +246,12 @@ class BoolTest(unittest.TestCase): def test_fileclosed(self): try: - f = file(TESTFN, "w") + f = file(test_support.TESTFN, "w") self.assertIs(f.closed, False) f.close() self.assertIs(f.closed, True) finally: - os.remove(TESTFN) + os.remove(test_support.TESTFN) def test_operator(self): import operator @@ -288,8 +278,8 @@ class BoolTest(unittest.TestCase): def test_marshal(self): import marshal - veris(marshal.loads(marshal.dumps(True)), True) - veris(marshal.loads(marshal.dumps(False)), False) + self.assertIs(marshal.loads(marshal.dumps(True)), True) + self.assertIs(marshal.loads(marshal.dumps(False)), False) def test_pickle(self): import pickle |