1
0
Fork 0
mirror of https://github.com/shlomif/PySolFC.git synced 2025-04-05 00:02:29 -04:00
PySolFC/scripts/gen_individual_importing_tests.py
Shlomi Fish 03c83d7900 Convert to pysollib.resource.
This also includes a sys.path.insert(0, ...) fix (to prepend) instead of
sys.append in order to fix finding pysollib/__init.py__ in the global
path.
2012-11-25 17:55:43 +02:00

13 lines
504 B
Python

#!/usr/bin/env python
import os.path
for module_name in ['pysollib.mfxutil', 'pysollib.move', 'pysollib.resource', 'pysollib.settings', 'pysollib.mygettext', 'pysollib.wizardpresets',]:
open(os.path.join(".", "tests", "individually-importing", "import_" + module_name + ".py"), 'w').write('''#!/usr/bin/env python
import sys
sys.path.append("./tests/lib")
from TAP.Simple import plan, ok
plan(1)
sys.path.insert(0, ".")
import %(module_name)s
ok(1, "imported")
''' % { 'module_name': module_name })