summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_descr.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_descr.py')
-rw-r--r--Lib/test/test_descr.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py
index 99eecd3..76636a9 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -3603,7 +3603,15 @@ def mutable_names():
class C(object):
pass
- C.__name__ = 'C'
+ # C.__module__ could be 'test_descr' or '__main__'
+ mod = C.__module__
+
+ C.__name__ = 'D'
+ vereq((C.__module__, C.__name__), (mod, 'D'))
+
+ C.__name__ = 'D.E'
+ vereq((C.__module__, C.__name__), (mod, 'D.E'))
+
def test_main():
do_this_first()