Commits

benjamin.peterson  committed 645b305

[svn r78680] set svn:eol-style on Lib files

  • Participants
  • Parent commits 40100fb

Comments (0)

Files changed (2)

File Lib/distutils/tests/test_bdist_msi.py

-"""Tests for distutils.command.bdist_msi."""
-import unittest
-import sys
-
-from test.test_support import run_unittest
-
-from distutils.tests import support
-
-@unittest.skipUnless(sys.platform=="win32", "These tests are only for win32")
-class BDistMSITestCase(support.TempdirManager,
-                       support.LoggingSilencer,
-                       unittest.TestCase):
-
-    def test_minial(self):
-        # minimal test XXX need more tests
-        from distutils.command.bdist_msi import bdist_msi
-        pkg_pth, dist = self.create_dist()
-        cmd = bdist_msi(dist)
-        cmd.ensure_finalized()
-
-def test_suite():
-    return unittest.makeSuite(BDistMSITestCase)
-
-if __name__ == '__main__':
-    run_unittest(test_suite())
+"""Tests for distutils.command.bdist_msi."""
+import unittest
+import sys
+
+from test.test_support import run_unittest
+
+from distutils.tests import support
+
+@unittest.skipUnless(sys.platform=="win32", "These tests are only for win32")
+class BDistMSITestCase(support.TempdirManager,
+                       support.LoggingSilencer,
+                       unittest.TestCase):
+
+    def test_minial(self):
+        # minimal test XXX need more tests
+        from distutils.command.bdist_msi import bdist_msi
+        pkg_pth, dist = self.create_dist()
+        cmd = bdist_msi(dist)
+        cmd.ensure_finalized()
+
+def test_suite():
+    return unittest.makeSuite(BDistMSITestCase)
+
+if __name__ == '__main__':
+    run_unittest(test_suite())

File Lib/distutils/tests/test_dep_util.py

-"""Tests for distutils.dep_util."""
-import unittest
-import os
-import time
-
-from distutils.dep_util import newer, newer_pairwise, newer_group
-from distutils.errors import DistutilsFileError
-from distutils.tests import support
-
-class DepUtilTestCase(support.TempdirManager, unittest.TestCase):
-
-    def test_newer(self):
-
-        tmpdir = self.mkdtemp()
-        new_file = os.path.join(tmpdir, 'new')
-        old_file = os.path.abspath(__file__)
-
-        # Raise DistutilsFileError if 'new_file' does not exist.
-        self.assertRaises(DistutilsFileError, newer, new_file, old_file)
-
-        # Return true if 'new_file' exists and is more recently modified than
-        # 'old_file', or if 'new_file' exists and 'old_file' doesn't.
-        self.write_file(new_file)
-        self.assertTrue(newer(new_file, 'I_dont_exist'))
-        self.assertTrue(newer(new_file, old_file))
-
-        # Return false if both exist and 'old_file' is the same age or younger
-        # than 'new_file'.
-        self.assertFalse(newer(old_file, new_file))
-
-    def test_newer_pairwise(self):
-        tmpdir = self.mkdtemp()
-        sources = os.path.join(tmpdir, 'sources')
-        targets = os.path.join(tmpdir, 'targets')
-        os.mkdir(sources)
-        os.mkdir(targets)
-        one = os.path.join(sources, 'one')
-        two = os.path.join(sources, 'two')
-        three = os.path.abspath(__file__)    # I am the old file
-        four = os.path.join(targets, 'four')
-        self.write_file(one)
-        self.write_file(two)
-        self.write_file(four)
-
-        self.assertEquals(newer_pairwise([one, two], [three, four]),
-                          ([one],[three]))
-
-    def test_newer_group(self):
-        tmpdir = self.mkdtemp()
-        sources = os.path.join(tmpdir, 'sources')
-        os.mkdir(sources)
-        one = os.path.join(sources, 'one')
-        two = os.path.join(sources, 'two')
-        three = os.path.join(sources, 'three')
-        old_file = os.path.abspath(__file__)
-
-        # return true if 'old_file' is out-of-date with respect to any file
-        # listed in 'sources'.
-        self.write_file(one)
-        self.write_file(two)
-        self.write_file(three)
-        self.assertTrue(newer_group([one, two, three], old_file))
-        self.assertFalse(newer_group([one, two, old_file], three))
-
-        # missing handling
-        os.remove(one)
-        self.assertRaises(OSError, newer_group, [one, two, old_file], three)
-
-        self.assertFalse(newer_group([one, two, old_file], three,
-                                     missing='ignore'))
-
-        self.assertTrue(newer_group([one, two, old_file], three,
-                                    missing='newer'))
-
-
-def test_suite():
-    return unittest.makeSuite(DepUtilTestCase)
-
-if __name__ == "__main__":
-    unittest.main(defaultTest="test_suite")
+"""Tests for distutils.dep_util."""
+import unittest
+import os
+import time
+
+from distutils.dep_util import newer, newer_pairwise, newer_group
+from distutils.errors import DistutilsFileError
+from distutils.tests import support
+
+class DepUtilTestCase(support.TempdirManager, unittest.TestCase):
+
+    def test_newer(self):
+
+        tmpdir = self.mkdtemp()
+        new_file = os.path.join(tmpdir, 'new')
+        old_file = os.path.abspath(__file__)
+
+        # Raise DistutilsFileError if 'new_file' does not exist.
+        self.assertRaises(DistutilsFileError, newer, new_file, old_file)
+
+        # Return true if 'new_file' exists and is more recently modified than
+        # 'old_file', or if 'new_file' exists and 'old_file' doesn't.
+        self.write_file(new_file)
+        self.assertTrue(newer(new_file, 'I_dont_exist'))
+        self.assertTrue(newer(new_file, old_file))
+
+        # Return false if both exist and 'old_file' is the same age or younger
+        # than 'new_file'.
+        self.assertFalse(newer(old_file, new_file))
+
+    def test_newer_pairwise(self):
+        tmpdir = self.mkdtemp()
+        sources = os.path.join(tmpdir, 'sources')
+        targets = os.path.join(tmpdir, 'targets')
+        os.mkdir(sources)
+        os.mkdir(targets)
+        one = os.path.join(sources, 'one')
+        two = os.path.join(sources, 'two')
+        three = os.path.abspath(__file__)    # I am the old file
+        four = os.path.join(targets, 'four')
+        self.write_file(one)
+        self.write_file(two)
+        self.write_file(four)
+
+        self.assertEquals(newer_pairwise([one, two], [three, four]),
+                          ([one],[three]))
+
+    def test_newer_group(self):
+        tmpdir = self.mkdtemp()
+        sources = os.path.join(tmpdir, 'sources')
+        os.mkdir(sources)
+        one = os.path.join(sources, 'one')
+        two = os.path.join(sources, 'two')
+        three = os.path.join(sources, 'three')
+        old_file = os.path.abspath(__file__)
+
+        # return true if 'old_file' is out-of-date with respect to any file
+        # listed in 'sources'.
+        self.write_file(one)
+        self.write_file(two)
+        self.write_file(three)
+        self.assertTrue(newer_group([one, two, three], old_file))
+        self.assertFalse(newer_group([one, two, old_file], three))
+
+        # missing handling
+        os.remove(one)
+        self.assertRaises(OSError, newer_group, [one, two, old_file], three)
+
+        self.assertFalse(newer_group([one, two, old_file], three,
+                                     missing='ignore'))
+
+        self.assertTrue(newer_group([one, two, old_file], three,
+                                    missing='newer'))
+
+
+def test_suite():
+    return unittest.makeSuite(DepUtilTestCase)
+
+if __name__ == "__main__":
+    unittest.main(defaultTest="test_suite")