]> granicus.if.org Git - python/commitdiff
Make test_importlib output easier to trace back to the failing test
authorBrett Cannon <brett@python.org>
Fri, 22 Nov 2013 19:47:09 +0000 (14:47 -0500)
committerBrett Cannon <brett@python.org>
Fri, 22 Nov 2013 19:47:09 +0000 (14:47 -0500)
class.

Lib/test/test_importlib/util.py

index cb08ce6e52dd2793924994c4ebacca0924ea0e5c..80d43b5baaafc0c6947f891f228db6fa843c646c 100644 (file)
@@ -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)