[Python-checkins] python/dist/src/Lib/test test_warnings.py,1.2,1.3
rhettinger@users.sourceforge.net
rhettinger@users.sourceforge.net
Sat, 12 Jul 2003 23:15:13 -0700
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv10418
Modified Files:
test_warnings.py
Log Message:
This test failed on WindowsME because the full file path did not get
reported consistently with the *nix world. 'Lib/test/test_warnings.py'
came out as 'lib\test\test_warnings.py'. The basename is all we care
about so I used that.
Index: test_warnings.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_warnings.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** test_warnings.py 11 Jul 2003 20:22:55 -0000 1.2
--- test_warnings.py 13 Jul 2003 06:15:11 -0000 1.3
***************
*** 1,3 ****
--- 1,4 ----
import warnings
+ import os
# The warnings module isn't easily tested, because it relies on module
***************
*** 9,14 ****
def showwarning(message, category, filename, lineno, file=None):
! i = filename.find("Lib")
! filename = filename[i:]
print "%s:%s: %s: %s" % (filename, lineno, category.__name__, message)
--- 10,14 ----
def showwarning(message, category, filename, lineno, file=None):
! filename = os.path.basename(filename)
print "%s:%s: %s: %s" % (filename, lineno, category.__name__, message)