[Python-checkins] CVS: python/dist/src/Lib/test test_support.py,1.21,1.21.4.1
Tim Peters
tim_one@users.sourceforge.net
Fri, 06 Jul 2001 14:20:48 -0700
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv6549/lib/test
Modified Files:
Tag: descr-branch
test_support.py
Log Message:
Needed first to support later merges.
Index: test_support.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_support.py,v
retrieving revision 1.21
retrieving revision 1.21.4.1
diff -C2 -r1.21 -r1.21.4.1
*** test_support.py 2001/03/23 18:04:02 1.21
--- test_support.py 2001/07/06 21:20:46 1.21.4.1
***************
*** 64,67 ****
--- 64,71 ----
elif os.name != 'riscos':
TESTFN = '@test'
+ # Unicode name only used if TEST_FN_ENCODING exists for the platform.
+ TESTFN_UNICODE=u"@test-\xe0\xf2" # 2 latin characters.
+ if os.name=="nt":
+ TESTFN_ENCODING="mbcs"
else:
TESTFN = 'test'
***************
*** 90,93 ****
--- 94,105 ----
if not condition:
raise TestFailed(reason)
+
+ def sortdict(dict):
+ "Like repr(dict), but in sorted order."
+ items = dict.items()
+ items.sort()
+ reprpairs = ["%r: %r" % pair for pair in items]
+ withcommas = ", ".join(reprpairs)
+ return "{%s}" % withcommas
def check_syntax(statement):