mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
test for py3 importing of modules.
This commit is contained in:
parent
9d5cfedb40
commit
e997b01d18
1 changed files with 4 additions and 2 deletions
|
@ -198,7 +198,9 @@ for module_name in \
|
||||||
'pysollib.wizardpresets',
|
'pysollib.wizardpresets',
|
||||||
'pysollib.wizardutil',
|
'pysollib.wizardutil',
|
||||||
]:
|
]:
|
||||||
open(os.path.join(".", "tests", "individually-importing", "import_" + module_name + ".py"), 'w').write('''#!/usr/bin/env python
|
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
|
||||||
import sys
|
import sys
|
||||||
sys.path.append("./tests/lib")
|
sys.path.append("./tests/lib")
|
||||||
from TAP.Simple import plan, ok
|
from TAP.Simple import plan, ok
|
||||||
|
@ -207,4 +209,4 @@ plan(1)
|
||||||
sys.path.insert(0, ".")
|
sys.path.insert(0, ".")
|
||||||
import %(module_name)s
|
import %(module_name)s
|
||||||
ok(1, "imported")
|
ok(1, "imported")
|
||||||
''' % {'module_name': module_name})
|
''' % {'module_name': module_name, 'ver': ver})
|
||||||
|
|
Loading…
Add table
Reference in a new issue