[Python-checkins] distutils2: [DATA FILES] Add one assert in test_rglob. All tests green, chuck norris will

tarek.ziade python-checkins at python.org
Wed Feb 16 22:23:56 CET 2011


tarek.ziade pushed 84c024423fb3 to distutils2:

http://hg.python.org/distutils2/rev/84c024423fb3
changeset:   1029:84c024423fb3
user:        FELD Boris <lothiraldan at gmail.com>
date:        Thu Jan 27 19:44:36 2011 +0100
summary:
  [DATA FILES] Add one assert in test_rglob. All tests green, chuck norris will be happy.

files:
  distutils2/tests/test_data_files.py

diff --git a/distutils2/tests/test_data_files.py b/distutils2/tests/test_data_files.py
--- a/distutils2/tests/test_data_files.py
+++ b/distutils2/tests/test_data_files.py
@@ -21,7 +21,7 @@
         os.makedirs(os.path.join('mailman', 'database', 'schemas'))
         os.makedirs(os.path.join('mailman', 'etc'))
         os.makedirs(os.path.join('mailman', 'foo', 'some', 'path', 'bar'))
-        os.makedirs(os.path.join('developpers-docs', 'api'))
+        os.makedirs(os.path.join('developer-docs', 'api'))
     
         self.write_file('README', '')
         self.write_file('some.tpl', '')
@@ -31,8 +31,8 @@
         self.write_file(os.path.join('mailman', 'etc', 'my.cnf'), '')
         self.write_file(os.path.join('mailman', 'foo', 'some', 'path', 'bar', 'my.cfg'), '')
         self.write_file(os.path.join('mailman', 'foo', 'some', 'path', 'other.cfg'), '')
-        self.write_file(os.path.join('developpers-docs', 'index.txt'), '')
-        self.write_file(os.path.join('developpers-docs', 'api', 'toc.txt'), '')
+        self.write_file(os.path.join('developer-docs', 'index.txt'), '')
+        self.write_file(os.path.join('developer-docs', 'api', 'toc.txt'), '')
                
        
     def test_simple_glob(self):
@@ -73,14 +73,16 @@
         tempdir = self.mkdtemp()
         os.chdir(tempdir)
         os.makedirs(os.path.join('scripts', 'bin'))
+        path0 = 'binary0.bin'
         path1 = os.path.join('scripts', 'binary1.bin')
-        path2 = os.path.join('scripts', 'bin', 'binary1.bin')
+        path2 = os.path.join('scripts', 'bin', 'binary2.bin')
+        self.write_file(path0, '')
         self.write_file(path1, '')
         self.write_file(path2, '')
         category = '{bin}'
         self.assertEquals(check_glob(
             [('**/*.bin', category)]),
-            {path1 : set([category]), path2 : set([category])})
+            {path0 : set([category]), path1 : set([category]), path2 : set([category])})
     
     def test_final_exemple_glob(self):
         tempdir = self.mkdtemp()
@@ -99,15 +101,15 @@
         result = {
             os.path.join('mailman', 'database', 'schemas', 'blah.schema') : set([resources[0][1]]),
             'some.tpl' : set([resources[1][1]]),
-            os.path.join('developpers-docs', 'index.txt') : set([resources[2][1]]),
-            os.path.join('developpers-docs', 'api', 'toc.txt') : set([resources[2][1]]),
+            os.path.join('developer-docs', 'index.txt') : set([resources[2][1]]),
+            os.path.join('developer-docs', 'api', 'toc.txt') : set([resources[2][1]]),
             'README' : set([resources[3][1]]),
             os.path.join('mailman', 'etc', 'my.cnf') : set([resources[4][1]]),
             os.path.join('mailman', 'foo', 'some', 'path', 'bar', 'my.cfg') : set([resources[5][1], resources[6][1]]),
             os.path.join('mailman', 'foo', 'some', 'path', 'other.cfg') : set([resources[6][1]]),
             'some-new-semantic.sns' : set([resources[7][1]])
         }
-        self.assertEquals(sorted(check_glob(resources)), sorted(result))
+        self.assertEquals(check_glob(resources), result)
             
 def test_suite():
     return unittest.makeSuite(DataFilesTestCase)

--
Repository URL: http://hg.python.org/distutils2


More information about the Python-checkins mailing list