def test_get_package_location_returns_correct_directory_for_package(self): self.create_empty_package_file('__init__.py') with working_dir(self.sandbox_dir): actual = get_package_location(self.test_module_name) self.assertEqual(self.sandbox_dir, actual)
def test_get_package_location_can_import_package(self): self.create_empty_package_file('__init__.py') with working_dir(self.sandbox_dir): self.assertThat( lambda: get_package_location(self.test_module_name), Not(Raises()), verbose=True)
def test_get_package_location_returns_correct_directory(self): with self.simple_file_setup(): actual = get_package_location('test_foo') self.assertEqual(self.sandbox_dir, actual)
def test_get_package_location_can_import_file(self): with self.simple_file_setup(): self.assertThat(lambda: get_package_location('test_foo'), Not(Raises()))