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

Function az

test/test_analytics/test_analyzer_go.py:16–36  ·  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

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

Callers

nothing calls this directly

Calls 2

AnalyzerClass · 0.90
GoGraphServerClass · 0.90

Tested by

no test coverage detected