MCPcopy Index your code
hub / github.com/Persper/code-analytics / az

Function az

test/test_analytics/test_analyzer_js.py:18–38  ·  view source on GitHub ↗

Build the test repo if not already exists Args: repo_path - A string, path to the to-be-built test repo script_path - A string, path to the repo creator script test_src_path - A string, path to the dir to be passed to repo creator

()

Source from the content-addressed store, hash-verified

16
17@pytest.fixture(scope='module')
18def az():
19 """ Build the test repo if not already exists
20
21 Args:
22 repo_path - A string, path to the to-be-built test repo
23 script_path - A string, path to the repo creator script
24 test_src_path - A string, path to the dir to be passed to repo creator
25 """
26 repo_path = os.path.join(root_path, 'repos/js_test_repo')
27 script_path = os.path.join(root_path, 'tools/repo_creater/create_repo.py')
28 test_src_path = os.path.join(root_path, 'test/js_test_repo')
29 server_addr = 'http://localhost:%d' % server_port
30
31 # Always use latest source to create test repo
32 if os.path.exists(repo_path):
33 shutil.rmtree(repo_path)
34
35 cmd = '{} {}'.format(script_path, test_src_path)
36 subprocess.call(cmd, shell=True)
37
38 return Analyzer(repo_path, GraphServerHttp(server_addr, JS_FILENAME_REGEXES))
39
40
41def test_az(az: Analyzer):

Callers

nothing calls this directly

Calls 2

AnalyzerClass · 0.90
GraphServerHttpClass · 0.90

Tested by

no test coverage detected