[Python-checkins] python/dist/src/Lib/test regrtest.py,1.99,1.100

tim_one@users.sourceforge.net tim_one@users.sourceforge.net
Tue, 08 Oct 2002 18:07:13 -0700


Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv26707/python/Lib/test

Modified Files:
	regrtest.py 
Log Message:
Logic for determining whether skipping test_pep277 is expected:  whether
ths "should be" skipped depends on os.path.supports_unicode_filenames,
not really on the platform.  Fiddled the expected-skip constructor
appropriately.


Index: regrtest.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/regrtest.py,v
retrieving revision 1.99
retrieving revision 1.100
diff -C2 -d -r1.99 -r1.100
*** regrtest.py	6 Oct 2002 20:36:31 -0000	1.99
--- regrtest.py	9 Oct 2002 01:07:11 -0000	1.100
***************
*** 496,499 ****
--- 496,504 ----
  # Map sys.platform to a string containing the basenames of tests
  # expected to be skipped on that platform.
+ #
+ # Special cases:
+ #     test_pep277
+ #         The _ExpectedSkips constructor adds this to the set of expected
+ #         skips if not os.path.supports_unicode_filenames.
  
  _expectations = {
***************
*** 544,548 ****
          test_nis
          test_ntpath
-         test_pep277
          test_socket_ssl
          test_socketserver
--- 549,552 ----
***************
*** 820,827 ****
--- 824,834 ----
  class _ExpectedSkips:
      def __init__(self):
+         import os.path
          self.valid = False
          if sys.platform in _expectations:
              s = _expectations[sys.platform]
              self.expected = Set(s.split())
+             if not os.path.supports_unicode_filenames:
+                 self.expected.add('test_pep277')
              self.valid = True