Exemplo n.º 1
0
 def test_missing_name(self):
     with self.assertRaises(ValueError):
         i = Module('doesnt_exist', samples_dir)
Exemplo n.º 2
0
 def test_package_importable(self):
     i = Module('package1', samples_dir)
     assert i.path == samples_dir / 'package1'
     assert i.file == samples_dir / 'package1' / '__init__.py'
     assert i.is_package
Exemplo n.º 3
0
 def test_module_importable(self):
     i = Module('module1', samples_dir)
     assert i.path == samples_dir / 'module1.py'
     assert not i.is_package
Exemplo n.º 4
0
 def test_conflicting_modules(self):
     with pytest.raises(ValueError, match="Multiple"):
         Module('module1', samples_dir / 'conflicting_modules')