forked from richleland/firepython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_basic.py
More file actions
26 lines (20 loc) · 704 Bytes
/
test_basic.py
File metadata and controls
26 lines (20 loc) · 704 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import nose.tools as NT
IMPORT_MODS = [
'firepython',
'firepython.utils',
'firepython.middleware',
'firepython.handlers',
'firepython._const',
'firepython._setup_common',
'firepython.demo',
'firepython.demo.app',
'firepython.demo._body',
]
def test_can_import_everything_okay_and_dunder_alls_are_good():
for mod in IMPORT_MODS:
imported = __import__(mod, {}, {}, mod.split('.'))
yield NT.assert_true, bool(imported), \
"module %s imports okay" % mod
for member in getattr(imported, '__all__', []):
yield NT.assert_true, hasattr(imported, member), \
"module %s has attr %s" % (imported, member)