1
0
Fork 0
mirror of https://github.com/shlomif/PySolFC.git synced 2025-04-05 00:02:29 -04:00

refactor.

This commit is contained in:
Shlomi Fish 2018-04-15 18:43:26 +03:00
parent dd675e30b5
commit 661c23e1b0

View file

@ -200,10 +200,12 @@ for module_name in \
]:
for ver in [2, 3]:
if ver == 2 or "gtk" not in module_name:
open(os.path.join(".", "tests", "individually-importing", "import_v" + str(ver) + "_" + module_name + ".py"), 'w').write('''#!/usr/bin/env python%(ver)d
def fmt(s):
return s % {'module_name': module_name, 'ver': ver}
open(os.path.join(".", "tests", "individually-importing", fmt("import_v%(ver)d_%(module_name)s.py")), 'w').write(fmt('''#!/usr/bin/env python%(ver)d
import sys
print('1..1')
sys.path.insert(0, ".")
import %(module_name)s
print('ok 1 - imported')
''' % {'module_name': module_name, 'ver': ver})
'''))