Ticket #6430: 6430_2.patch

File 6430_2.patch, 1.1 KB (added by eddie, 6 years ago)
  • twisted/trial/test/test_loader.py

     
    179179        L{runner.filenameToModule} raises a C{SyntaxError} when a non-Python
    180180        file is passed.
    181181        """
    182         self.failUnlessRaises(SyntaxError, runner.filenameToModule,
    183                               util.sibpath(__file__, 'notpython'))
     182        filename = filepath.FilePath(self.parent).child('notpython')
     183        filename.setContent("This isn't python")
     184        self.failUnlessRaises(
     185            SyntaxError, runner.filenameToModule, filename.path)
    184186
    185187
    186188    def test_filenameMatchesPackage(self):
  • twisted/trial/test/notpython

     
    1 
    2 this isn't python