From 2f114469b58bde80965dc4b75b7d9c12050f31c7 Mon Sep 17 00:00:00 2001 From: Shlomi Fish Date: Tue, 1 May 2018 17:52:17 +0300 Subject: [PATCH] add py2 tests --- Makefile | 2 +- scripts/gen_individual_importing_tests.py | 1 + tests/{unit => lib/pysol_tests}/hint.py | 3 +-- 3 files changed, 3 insertions(+), 3 deletions(-) rename tests/{unit => lib/pysol_tests}/hint.py (93%) diff --git a/Makefile b/Makefile index 4a8232a8..649e158f 100644 --- a/Makefile +++ b/Makefile @@ -68,7 +68,7 @@ pretest: python scripts/gen_individual_importing_tests.py TEST_ENV = PYTHONPATH="`pwd`:`pwd`/tests/lib" -TEST_FILES = tests/style/*.t tests/unit/*.py tests/unit-generated/*.py tests/individually-importing/*.py +TEST_FILES = tests/style/*.t tests/unit-generated/*.py tests/individually-importing/*.py define RUN_TESTS $(TEST_ENV) $1 $(TEST_FILES) diff --git a/scripts/gen_individual_importing_tests.py b/scripts/gen_individual_importing_tests.py index 18c0d5db..946d1704 100644 --- a/scripts/gen_individual_importing_tests.py +++ b/scripts/gen_individual_importing_tests.py @@ -215,6 +215,7 @@ print('ok 1 - imported') for ver in [2, 3]: for mod in [ 'pysol_tests.acard_unit', + 'pysol_tests.hint', 'pysol_tests.import_file1', 'pysol_tests.latin1_conv_unit', 'pysol_tests.ms_deals1', diff --git a/tests/unit/hint.py b/tests/lib/pysol_tests/hint.py similarity index 93% rename from tests/unit/hint.py rename to tests/lib/pysol_tests/hint.py index bb9e3440..e0ddf55c 100644 --- a/tests/unit/hint.py +++ b/tests/lib/pysol_tests/hint.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python3 # Written by Shlomi Fish, under the MIT Expat License. import unittest @@ -22,7 +21,7 @@ class MyTests(unittest.TestCase): # diag('got == ' + got) -if __name__ == '__main__': +def mymain(): from pycotap import TAPTestRunner suite = unittest.TestLoader().loadTestsFromTestCase(MyTests) TAPTestRunner().run(suite)