MCPcopy Create free account
hub / github.com/numpy/numpy / main

Function main

tools/check_installed_files.py:37–64  ·  view source on GitHub ↗
(install_dir)

Source from the content-addressed store, hash-verified

35
36
37def main(install_dir):
38 INSTALLED_DIR = os.path.join(ROOT_DIR, install_dir)
39 if not os.path.exists(INSTALLED_DIR):
40 raise ValueError(
41 f"Provided install dir {INSTALLED_DIR} does not exist"
42 )
43
44 numpy_test_files = get_files(NUMPY_DIR, kind='test')
45 installed_test_files = get_files(INSTALLED_DIR, kind='test')
46
47 # Check test files detected in repo are installed
48 for test_file in numpy_test_files.keys():
49 if test_file not in installed_test_files.keys():
50 raise Exception(
51 "%s is not installed" % numpy_test_files[test_file]
52 )
53
54 print("----------- All the test files were installed --------------")
55
56 numpy_pyi_files = get_files(NUMPY_DIR, kind='stub')
57 installed_pyi_files = get_files(INSTALLED_DIR, kind='stub')
58
59 # Check *.pyi files detected in repo are installed
60 for pyi_file in numpy_pyi_files.keys():
61 if pyi_file not in installed_pyi_files.keys():
62 raise Exception("%s is not installed" % numpy_pyi_files[pyi_file])
63
64 print("----------- All the .pyi files were installed --------------")
65
66
67def get_files(dir_to_check, kind='test'):

Callers 1

Calls 5

get_filesFunction · 0.85
printFunction · 0.85
keysMethod · 0.80
joinMethod · 0.45
existsMethod · 0.45

Tested by

no test coverage detected