Make DynamicShapes*Tests show up properly in the test failure repro string (#115019)
Set their `__module__` attributes so that Python thinks the test classes
are defined in test_dynamic_shapes and not in torch._dynamo.testing.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/115019
Approved by: https://github.com/Skylion007
ghstack dependencies: #115003
diff --git a/test/dynamo/test_dynamic_shapes.py b/test/dynamo/test_dynamic_shapes.py
index abd0f66..abee763 100644
--- a/test/dynamo/test_dynamic_shapes.py
+++ b/test/dynamo/test_dynamic_shapes.py
@@ -54,6 +54,7 @@
test_classes[test_class.__name__] = test_class
# REMOVING THIS LINE WILL STOP TESTS FROM RUNNING
globals()[test_class.__name__] = test_class
+ test_class.__module__ = __name__
return test_class