File: test_fakemodule.py

package info (click to toggle)
ipython 1.2.1-2~bpo70%2B1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy-backports
  • size: 22,884 kB
  • sloc: python: 67,305; makefile: 469; lisp: 272; sh: 251
file content (17 lines) | stat: -rw-r--r-- 449 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

# 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)