'If passed the path to a file containing the implementation of a
module within a package which is not on the import path,
L{runner.filenameToModule} returns a module object loosely
resembling the module defined by that file anyway.'

def test_moduleNotInPath(self):

    self.addCleanup(sys.modules.pop, 'test_sample', None)
    self.mangleSysPath(self.oldPath)
    sample1 = runner.filenameToModule(os.path.join(self.parent, 'goodpackage', 'test_sample.py'))
    self.mangleSysPath(self.newPath)
    from goodpackage import test_sample as sample2
    self.assertEqual(os.path.splitext(sample2.__file__)[0], os.path.splitext(sample1.__file__)[0])
