def test_filenameMatchesPackage(self):
        """
        The C{__file__} attribute of the module should match the package name.
        """
        filename = filepath.FilePath(self.parent).child('goodpackage.py')
        filename.setContent(packages.testModule.encode("utf8"))

        try:
            module = runner.filenameToModule(filename.path)
            self.assertEqual(filename.path, module.__file__)
        finally:
            filename.remove()

        The C{__file__} attribute of the module should match the package name.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/trial/test/test_loader.py