From 6304994ed4a1aec63e20d44a248042bc84f89a27 Mon Sep 17 00:00:00 2001 From: Shlomi Fish Date: Tue, 1 May 2018 17:45:37 +0300 Subject: [PATCH] add py2 tests --- scripts/gen_individual_importing_tests.py | 1 + tests/{unit => lib/pysol_tests}/latin1_conv_unit.py | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) rename tests/{unit => lib/pysol_tests}/latin1_conv_unit.py (86%) diff --git a/scripts/gen_individual_importing_tests.py b/scripts/gen_individual_importing_tests.py index 31d98c7e..18c0d5db 100644 --- a/scripts/gen_individual_importing_tests.py +++ b/scripts/gen_individual_importing_tests.py @@ -216,6 +216,7 @@ for ver in [2, 3]: for mod in [ 'pysol_tests.acard_unit', 'pysol_tests.import_file1', + 'pysol_tests.latin1_conv_unit', 'pysol_tests.ms_deals1', ]: open(os.path.join(".", "tests", "unit-generated", diff --git a/tests/unit/latin1_conv_unit.py b/tests/lib/pysol_tests/latin1_conv_unit.py similarity index 86% rename from tests/unit/latin1_conv_unit.py rename to tests/lib/pysol_tests/latin1_conv_unit.py index 9a944a4f..e1200f4b 100644 --- a/tests/unit/latin1_conv_unit.py +++ b/tests/lib/pysol_tests/latin1_conv_unit.py @@ -1,7 +1,5 @@ -#!/usr/bin/env python3 # Written by Shlomi Fish, under the MIT Expat License. -# imports import unittest from pysollib.mfxutil import latin1_normalize @@ -11,7 +9,7 @@ class MyTests(unittest.TestCase): self.assertEqual(latin1_normalize('HELLO%%good'), 'hellogood') -if __name__ == '__main__': +def mymain(): from pycotap import TAPTestRunner suite = unittest.TestLoader().loadTestsFromTestCase(MyTests) TAPTestRunner().run(suite)