Mercurial > repos > shellac > guppy_basecaller
comparison env/lib/python3.7/site-packages/networkx/testing/test.py @ 5:9b1c78e6ba9c draft default tip
"planemo upload commit 6c0a8142489327ece472c84e558c47da711a9142"
author | shellac |
---|---|
date | Mon, 01 Jun 2020 08:59:25 -0400 |
parents | 79f47841a781 |
children |
comparison
equal
deleted
inserted
replaced
4:79f47841a781 | 5:9b1c78e6ba9c |
---|---|
1 #!/usr/bin/env python | |
2 | |
3 | |
4 def run(verbosity=1, doctest=False): | |
5 """Run NetworkX tests. | |
6 | |
7 Parameters | |
8 ---------- | |
9 verbosity: integer, optional | |
10 Level of detail in test reports. Higher numbers provide more detail. | |
11 | |
12 doctest: bool, optional | |
13 True to run doctests in code modules | |
14 """ | |
15 | |
16 import pytest | |
17 | |
18 pytest_args = ['-l'] | |
19 | |
20 if verbosity and int(verbosity) > 1: | |
21 pytest_args += ["-" + "v"*(int(verbosity)-1)] | |
22 | |
23 if doctest: | |
24 pytest_args += ["--doctest-modules"] | |
25 | |
26 pytest_args += ["--pyargs", "networkx"] | |
27 | |
28 try: | |
29 code = pytest.main(pytest_args) | |
30 except SystemExit as exc: | |
31 code = exc.code | |
32 | |
33 return (code == 0) | |
34 | |
35 | |
36 if __name__ == "__main__": | |
37 run() |