mirror of
				https://github.com/datahub-project/datahub.git
				synced 2025-10-31 02:37:05 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			18 lines
		
	
	
		
			552 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			552 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| import pytest
 | |
| import setuptools
 | |
| 
 | |
| from datahub.testing.check_imports import ensure_no_indirect_model_imports
 | |
| 
 | |
| 
 | |
| def test_package_list_match_inits():
 | |
|     where = "./src"
 | |
|     package_list = set(setuptools.find_packages(where))
 | |
|     namespace_packages = set(setuptools.find_namespace_packages(where))
 | |
|     assert package_list == namespace_packages, "are you missing a package init file?"
 | |
| 
 | |
| 
 | |
| def test_check_import_paths(pytestconfig: pytest.Config) -> None:
 | |
|     root = pytestconfig.rootpath
 | |
| 
 | |
|     ensure_no_indirect_model_imports([root / "src", root / "tests"])
 | 
