mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
generate some duplicate code.
This commit is contained in:
parent
665985ec6d
commit
7860f47363
7 changed files with 14 additions and 21 deletions
2
Makefile
2
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/individually-importing/*.py
|
||||
TEST_FILES = tests/style/*.t tests/unit/*.py tests/unit-generated/*.py tests/individually-importing/*.py
|
||||
|
||||
define RUN_TESTS
|
||||
$(TEST_ENV) $1 $(TEST_FILES)
|
||||
|
|
|
@ -209,3 +209,16 @@ sys.path.insert(0, ".")
|
|||
import %(module_name)s
|
||||
print('ok 1 - imported')
|
||||
'''))
|
||||
|
||||
for ver in [2, 3]:
|
||||
for mod in [
|
||||
'pysol_tests.import_file1',
|
||||
'pysol_tests.ms_deals1',
|
||||
]:
|
||||
open(os.path.join(".", "tests", "unit-generated",
|
||||
'test__%s__v%d.py' % (mod, ver)
|
||||
), 'w').write('''#!/usr/bin/env python%(ver)d
|
||||
from %(mod)s import mymain
|
||||
|
||||
mymain()
|
||||
''' % {'mod': mod, 'ver': ver})
|
||||
|
|
0
tests/unit-generated/PLACEHOLDER
Normal file
0
tests/unit-generated/PLACEHOLDER
Normal file
|
@ -1,5 +0,0 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
from pysol_tests.import_file1 import mymain
|
||||
|
||||
mymain()
|
|
@ -1,5 +0,0 @@
|
|||
#!/usr/bin/python3
|
||||
|
||||
from pysol_tests.import_file1 import mymain
|
||||
|
||||
mymain()
|
|
@ -1,5 +0,0 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
from pysol_tests.ms_deals1 import mymain
|
||||
|
||||
mymain()
|
|
@ -1,5 +0,0 @@
|
|||
#!/usr/bin/python3
|
||||
|
||||
from pysol_tests.ms_deals1 import mymain
|
||||
|
||||
mymain()
|
Loading…
Add table
Reference in a new issue