MCPcopy Create free account
hub / github.com/deepnote/vscode-deepnote / run

Function run

pythonFiles/testlauncher.py:19–40  ·  view source on GitHub ↗

Runs the test cwd -- the current directory to be set testRunner -- test runner to be used `pytest` or `nose` args -- arguments passed into the test runner

(cwd, testRunner, args)

Source from the content-addressed store, hash-verified

17
18
19def run(cwd, testRunner, args):
20 """Runs the test
21 cwd -- the current directory to be set
22 testRunner -- test runner to be used `pytest` or `nose`
23 args -- arguments passed into the test runner
24 """
25
26 sys.path[0] = os.getcwd()
27 os.chdir(cwd)
28
29 try:
30 if testRunner == "pytest":
31 import pytest
32
33 pytest.main(args)
34 else:
35 import nose
36
37 nose.run(argv=args)
38 sys.exit(0)
39 finally:
40 pass
41
42
43if __name__ == "__main__":

Callers 1

testlauncher.pyFile · 0.70

Calls 1

runMethod · 0.65

Tested by

no test coverage detected