def test_directory(self):
        """
        Test loader against a filesystem directory containing an empty
        C{__init__.py} file. It should handle 'path' and 'path/' the same way.
        """
        goodDir = filepath.FilePath(self.parent).child('goodDirectory')
        goodDir.createDirectory()
        goodDir.child('__init__.py').setContent(b'')

        try:
            module = runner.filenameToModule(goodDir.path)
            self.assertTrue(module.__name__.endswith('goodDirectory'))
            module = runner.filenameToModule(goodDir.path + os.path.sep)
            self.assertTrue(module.__name__.endswith('goodDirectory'))
        finally:
            goodDir.remove()

        Test loader against a filesystem directory containing an empty
        C{__init__.py} file. It should handle 'path' and 'path/' the same way.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/trial/test/test_loader.py