summaryrefslogtreecommitdiffstats
path: root/Lib/test/support.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2010-01-24 21:02:05 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2010-01-24 21:02:05 (GMT)
commitfcdf9f215e9f304e362b47da7417e6117db7f5ed (patch)
treee6f2bcad984fca69414db249da87f76c585111ca /Lib/test/support.py
parent95a3633c9612cefb137f8f3bcf305b9d8a923688 (diff)
downloadcpython-fcdf9f215e9f304e362b47da7417e6117db7f5ed.zip
cpython-fcdf9f215e9f304e362b47da7417e6117db7f5ed.tar.gz
cpython-fcdf9f215e9f304e362b47da7417e6117db7f5ed.tar.bz2
Merged revisions 77731 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r77731 | ezio.melotti | 2010-01-24 22:59:24 +0200 (Sun, 24 Jan 2010) | 9 lines Merged revisions 77729 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r77729 | ezio.melotti | 2010-01-24 22:48:35 +0200 (Sun, 24 Jan 2010) | 1 line remove archaic functions from test_support ........ ................
Diffstat (limited to 'Lib/test/support.py')
-rw-r--r--Lib/test/support.py28
1 files changed, 2 insertions, 26 deletions
diff --git a/Lib/test/support.py b/Lib/test/support.py
index 18fb391..fc9a61a 100644
--- a/Lib/test/support.py
+++ b/Lib/test/support.py
@@ -21,8 +21,8 @@ __all__ = ["Error", "TestFailed", "ResourceDenied", "import_module",
"verbose", "use_resources", "max_memuse", "record_original_stdout",
"get_original_stdout", "unload", "unlink", "rmtree", "forget",
"is_resource_enabled", "requires", "find_unused_port", "bind_port",
- "fcmp", "is_jython", "TESTFN", "HOST", "FUZZ", "findfile", "verify",
- "vereq", "sortdict", "check_syntax_error", "open_urlresource",
+ "fcmp", "is_jython", "TESTFN", "HOST", "FUZZ", "findfile",
+ "sortdict", "check_syntax_error", "open_urlresource",
"check_warnings", "CleanImport", "EnvironmentVarGuard",
"TransientResource", "captured_output", "captured_stdout",
"time_out", "socket_peer_reset", "ioerror_peer_reset",
@@ -396,30 +396,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 = sorted(dict.items())