summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_support.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2010-01-24 20:48:35 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2010-01-24 20:48:35 (GMT)
commit469a05fe46b7adfac11d9d2e4c64ec4a419d5ea6 (patch)
tree1192ac21371a9131ce7764e4492cbbb8b25b6fbb /Lib/test/test_support.py
parentb0f5adc3f4e098b1744eeac65fc830fb1df2b8ab (diff)
downloadcpython-469a05fe46b7adfac11d9d2e4c64ec4a419d5ea6.zip
cpython-469a05fe46b7adfac11d9d2e4c64ec4a419d5ea6.tar.gz
cpython-469a05fe46b7adfac11d9d2e4c64ec4a419d5ea6.tar.bz2
remove archaic functions from test_support
Diffstat (limited to 'Lib/test/test_support.py')
-rw-r--r--Lib/test/test_support.py26
1 files changed, 1 insertions, 25 deletions
diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py
index c2dcb57..beaa170 100644
--- a/Lib/test/test_support.py
+++ b/Lib/test/test_support.py
@@ -22,7 +22,7 @@ __all__ = ["Error", "TestFailed", "ResourceDenied", "import_module",
"get_original_stdout", "unload", "unlink", "rmtree", "forget",
"is_resource_enabled", "requires", "find_unused_port", "bind_port",
"fcmp", "have_unicode", "is_jython", "TESTFN", "HOST", "FUZZ",
- "findfile", "verify", "vereq", "sortdict", "check_syntax_error",
+ "findfile", "sortdict", "check_syntax_error",
"open_urlresource", "check_warnings", "CleanImport",
"EnvironmentVarGuard", "captured_output",
"captured_stdout", "TransientResource", "transient_internet",
@@ -414,30 +414,6 @@ def findfile(file, here=__file__):
if os.path.exists(fn): return fn
return file
-def verify(condition, reason='test failed'):
- """Verify that condition is true. If not, raise TestFailed.
-
- The optional argument reason can be given to provide
- a better error text.
- """
-
- if not condition:
- raise TestFailed(reason)
-
-def vereq(a, b):
- """Raise TestFailed if a == b is false.
-
- This is better than verify(a == b) because, in case of failure, the
- error message incorporates repr(a) and repr(b) so you can see the
- inputs.
-
- Note that "not (a == b)" isn't necessarily the same as "a != b"; the
- former is tested.
- """
-
- if not (a == b):
- raise TestFailed("%r == %r" % (a, b))
-
def sortdict(dict):
"Like repr(dict), but in sorted order."
items = dict.items()