File: __init__.py

package info (click to toggle)
python-igraph 0.7.1.post6-7
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,360 kB
  • sloc: ansic: 20,069; python: 14,114; sh: 56; makefile: 13
file content (50 lines) | stat: -rw-r--r-- 1,379 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import unittest
from igraph.test import basic, layouts, games, foreign, structural, flow, \
    spectral, attributes, cliques, decomposition, operators, generators, \
    isomorphism, colortests, vertexseq, edgeseq, iterators, bipartite, \
    conversion, rng, separators, indexing, atlas, matching, homepage

def suite():
    return unittest.TestSuite([
        basic.suite(),
        layouts.suite(),
        generators.suite(),
        games.suite(),
        foreign.suite(),
        structural.suite(),
        flow.suite(),
        spectral.suite(),
        attributes.suite(),
        vertexseq.suite(),
        edgeseq.suite(),
        cliques.suite(),
        decomposition.suite(),
        conversion.suite(),
        operators.suite(),
        isomorphism.suite(),
        iterators.suite(),
        bipartite.suite(),
        colortests.suite(),
        rng.suite(),
        separators.suite(),
        indexing.suite(),
        atlas.suite(),
        matching.suite(),
        homepage.suite()
    ])

def run_tests(verbosity=1):
    try:
        # Support for testoob to have nice colored output
        import testoob
        runner = testoob.main
    except ImportError:
        runner = unittest.TextTestRunner(verbosity=verbosity).run
    runner(suite())

# Make nosetest skip run_tests
run_tests.__test__ = False

if __name__ == "__main__":
    run_tests(255)