From 873d1226b7cd42c663a4e09fa43a561de2e9f463 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Fri, 22 Nov 2013 14:47:09 -0500 Subject: [PATCH] Make test_importlib output easier to trace back to the failing test class. --- Lib/test/test_importlib/util.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Lib/test/test_importlib/util.py b/Lib/test/test_importlib/util.py index cb08ce6e52d..80d43b5baaa 100644 --- a/Lib/test/test_importlib/util.py +++ b/Lib/test/test_importlib/util.py @@ -20,6 +20,7 @@ def test_both(test_class, **kwargs): (test_class, unittest.TestCase)) source_tests = types.new_class('Source_'+test_class.__name__, (test_class, unittest.TestCase)) + frozen_tests.__module__ = source_tests.__module__ = test_class.__module__ for attr, (frozen_value, source_value) in kwargs.items(): setattr(frozen_tests, attr, frozen_value) setattr(source_tests, attr, source_value)