From c9742115d331d004ffdb2e11326b1e49ac7dc491 Mon Sep 17 00:00:00 2001 From: vincent Date: Mon, 21 Jun 2021 23:10:05 +0200 Subject: [PATCH] change test lauch --- tests/__init__.py | 16 +--------------- tests/__main__.py | 7 +++++++ tests/suite.py | 10 ++++++++++ 3 files changed, 18 insertions(+), 15 deletions(-) create mode 100644 tests/__main__.py create mode 100644 tests/suite.py diff --git a/tests/__init__.py b/tests/__init__.py index def2768..6793b95 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,15 +1 @@ -import unittest -from . import base -from . import api - - -def suite(): - suite = unittest.TestSuite() - suite.addTest(base.suite()) - suite.addTest(api.suite()) - return suite - - -if __name__ == "__main__": - runner = unittest.TextTestRunner() - runner.run(suite()) +from .suite import suite diff --git a/tests/__main__.py b/tests/__main__.py new file mode 100644 index 0000000..34c0387 --- /dev/null +++ b/tests/__main__.py @@ -0,0 +1,7 @@ +import unittest +from .suite import suite + +if __name__ == "__main__": + runner = unittest.TextTestRunner() + runner.verbosity = 3 + runner.run(suite()) diff --git a/tests/suite.py b/tests/suite.py new file mode 100644 index 0000000..f35f3fd --- /dev/null +++ b/tests/suite.py @@ -0,0 +1,10 @@ +import unittest +from . import base +from . import api + + +def suite(): + suite = unittest.TestSuite() + suite.addTest(base.suite()) + suite.addTest(api.suite()) + return suite