##// END OF EJS Templates
Remove usage of deprecated .message attribute of exceptions....
Remove usage of deprecated .message attribute of exceptions. This fixes https://bugs.launchpad.net/ipython/+bug/407836. The .message attribute of Exception is being deprecated in Python 2.6. All new code should simply use args[0] for this purpose. There are still a few places that modules in external use this. Hopefully these will be updated soon.

File last commit:

r2020:f3a106b5
r2293:16e44d71
Show More
test_fakemodule.py
17 lines | 468 B | text/x-python | PythonLexer
"""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)