def test_get_filename_API(self):

    class Tester(self.abc.FileLoader):

        def get_code(self, _):
            pass

        def get_source(self, _):
            pass

        def is_package(self, _):
            pass

        def module_repr(self, _):
            pass
    path = 'some_path'
    name = 'some_name'
    loader = Tester(name, path)
    self.assertEqual(path, loader.get_filename(name))
    self.assertEqual(path, loader.get_filename())
    self.assertEqual(path, loader.get_filename(None))
    with self.assertRaises(ImportError):
        loader.get_filename((name + 'XXX'))
def test_get_filename_API(self):

    class Tester(self.abc.FileLoader):

        def get_code(self, _):
            pass

        def get_source(self, _):
            pass

        def is_package(self, _):
            pass

        def module_repr(self, _):
            pass
    path = 'some_path'
    name = 'some_name'
    loader = Tester(name, path)
    self.assertEqual(path, loader.get_filename(name))
    self.assertEqual(path, loader.get_filename())
    self.assertEqual(path, loader.get_filename(None))
    with self.assertRaises(ImportError):
        loader.get_filename((name + 'XXX'))