Commits

Tarek Ziadé  committed fe95d31

added a test that covers the error Brian found

  • Participants
  • Parent commits ee3345e

Comments (0)

Files changed (2)

File src/distutils2/tests/test_util.py

 from StringIO import StringIO
 import subprocess
 
-from distutils2.errors import DistutilsPlatformError, DistutilsByteCompileError
+from distutils2.errors import (DistutilsPlatformError,
+                               DistutilsByteCompileError,
+                               DistutilsFileError)
+
 from distutils2.util import (convert_path, change_root,
                             check_environ, split_quoted, strtobool,
                             rfc822_escape, get_compiler_versions,
         finally:
             sys.dont_write_bytecode = old_dont_write_bytecode
 
+    def test_newer(self):
+        self.assertRaises(DistutilsFileError, util.newer, 'xxx', 'xxx')
+
+
 def test_suite():
     return unittest2.makeSuite(UtilTestCase)
 

File src/distutils2/util.py

 
 import sys, os, string, re
 
-from distutils2.errors import DistutilsPlatformError, DistutilsFileError
+from distutils2.errors import (DistutilsPlatformError, DistutilsFileError,
+                               DistutilsByteCompileError)
 from distutils2.spawn import spawn, find_executable
 from distutils2 import log
-from distutils2.errors import DistutilsByteCompileError
-
 from distutils2._backport import sysconfig as _sysconfig
 
 _PLATFORM = None