From a6c81b5a4a78c0359a230f55bbc976ca149fb423 Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Wed, 17 Nov 2021 20:11:12 +0200 Subject: [PATCH] Rewrite tests script for using the pybitmessage package, not src --- tests.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests.py b/tests.py index b933b212..713b25ef 100644 --- a/tests.py +++ b/tests.py @@ -13,9 +13,9 @@ def unittest_discover(): loader = unittest.defaultTestLoader # randomize the order of tests in test cases loader.sortTestMethodsUsing = lambda a, b: random.randint(-1, 1) - # pybitmessage symlink may disappear on Windows - testsuite = loader.discover('src.tests') - testsuite.addTests([loader.discover('src.pyelliptic')]) + # pybitmessage symlink disappears on Windows! + testsuite = loader.discover('pybitmessage.tests') + testsuite.addTests([loader.discover('pybitmessage.pyelliptic')]) return testsuite @@ -24,10 +24,9 @@ if __name__ == "__main__": success = unittest.TextTestRunner(verbosity=2).run( unittest_discover()).wasSuccessful() try: - from src.tests import common + from pybitmessage.tests import common except ImportError: checkup = False - print('ImportError from src.tests') else: checkup = common.checkup()