Mercurial > repos > shellac > guppy_basecaller
comparison env/lib/python3.7/site-packages/networkx/testing/test.py @ 0:26e78fe6e8c4 draft
"planemo upload commit c699937486c35866861690329de38ec1a5d9f783"
author | shellac |
---|---|
date | Sat, 02 May 2020 07:14:21 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:26e78fe6e8c4 |
---|---|
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() |