File: test_fakemodule.py

package info (click to toggle)
ipython 0.13.1-2%2Bdeb7u1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 15,752 kB
  • sloc: python: 69,537; makefile: 355; lisp: 272; sh: 80; objc: 37
file content (17 lines) | stat: -rw-r--r-- 468 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
"""Tests for the FakeModule objects.
"""

import nose.tools as nt

from IPython.core.fakemodule import FakeModule, init_fakemod_dict

# Make a fakemod and check a few properties
def test_mk_fakemod():
    fm = FakeModule()
    yield nt.assert_true,fm
    yield nt.assert_true,lambda : hasattr(fm,'__file__')

def test_mk_fakemod_fromdict():
    """Test making a FakeModule object with initial data"""
    fm = FakeModule(dict(hello=True))
    nt.assert_true(fm.hello)