diff options
author | Jason Pellerin <jpellerin@gmail.com> | 2007-03-12 19:27:02 +0000 |
---|---|---|
committer | Jason Pellerin <jpellerin@gmail.com> | 2007-03-12 19:27:02 +0000 |
commit | c75763d2cdc4714d54e94ef2c0fbc16b16d156c1 (patch) | |
tree | 785161d4f476b9f1e54b5b6aaaa51726fec5bd52 /unit_tests/test_loader.py | |
parent | 32d60eaf28dd2583cc631f43bf7a0d78603b85eb (diff) | |
download | nose-c75763d2cdc4714d54e94ef2c0fbc16b16d156c1.tar.gz |
Current context implementation is flawed: it has to do a *lot* of extra work when a parent-level setup fails. Beginning new, suite-based fixture implementation.
Diffstat (limited to 'unit_tests/test_loader.py')
-rw-r--r-- | unit_tests/test_loader.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/unit_tests/test_loader.py b/unit_tests/test_loader.py index ebe9f7b..791f908 100644 --- a/unit_tests/test_loader.py +++ b/unit_tests/test_loader.py @@ -3,7 +3,7 @@ import os import sys import unittest from nose.loader import TestLoader - +from mock import MockContext from nose import context # so we can set its __import__ from nose import util # so we can set its __import__ @@ -163,7 +163,7 @@ def mock_import(modname, gl=None, lc=None, fr=None): sys.modules[mname] = mod return mod except KeyError: - raise ImportError("No '%s' in fake module list" % modname) + raise ImportError("No '%s' in fake module list" % modname) class MockImporter: @@ -185,7 +185,7 @@ class TestTestLoader(unittest.TestCase): os.path.isdir = mock_isdir os.path.isfile = mock_isfile context.__import__ = util.__import__ = mock_import - self.l = TestLoader(importer=MockImporter()) + self.l = TestLoader(importer=MockImporter(), context=MockContext) def tearDown(self): os.listdir = _listdir |