diff options
author | Jason Pellerin <jpellerin@gmail.com> | 2007-03-11 17:46:31 +0000 |
---|---|---|
committer | Jason Pellerin <jpellerin@gmail.com> | 2007-03-11 17:46:31 +0000 |
commit | 0586443e8f642cbbb6a5846403df528459b21895 (patch) | |
tree | 59fda0dea947da600cc28c21ab2acc6d43217271 /functional_tests/test_loader.py | |
parent | 001c3f94a1f3ee8c1a6039111bc23e526681ce69 (diff) | |
download | nose-0586443e8f642cbbb6a5846403df528459b21895.tar.gz |
Work on loader and importer integration.
Diffstat (limited to 'functional_tests/test_loader.py')
-rw-r--r-- | functional_tests/test_loader.py | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/functional_tests/test_loader.py b/functional_tests/test_loader.py index 287f4c6..5a286ce 100644 --- a/functional_tests/test_loader.py +++ b/functional_tests/test_loader.py @@ -1,12 +1,23 @@ -from nose import loader import os +import sys import unittest - +from nose import loader support = os.path.join(os.path.dirname(__file__), 'support') class TestNoseTestLoader(unittest.TestCase): + def setUp(self): + self._mods = sys.modules.copy() + + def tearDown(self): + to_del = [ m for m in sys.modules.keys() if + m not in self._mods ] + if to_del: + for mod in to_del: + del sys.modules[mod] + sys.modules.update(self._mods) + def test_load_from_name_file(self): res = unittest.TestResult() wd = os.path.join(support, 'package1') @@ -31,4 +42,6 @@ class TestNoseTestLoader(unittest.TestCase): assert not res.failures, res.failures if __name__ == '__main__': + import logging + logging.basicConfig(level=logging.DEBUG) unittest.main() |