Issue #25548: Showing memory address of class objects in repl
diff --git a/Lib/test/test_reprlib.py b/Lib/test/test_reprlib.py
index 4bf9194..2ecea02 100644
--- a/Lib/test/test_reprlib.py
+++ b/Lib/test/test_reprlib.py
@@ -292,8 +292,8 @@
 ''')
         importlib.invalidate_caches()
         from areallylongpackageandmodulenametotestreprtruncation.areallylongpackageandmodulenametotestreprtruncation import foo
-        eq(repr(foo.foo),
-               "<class '%s.foo'>" % foo.__name__)
+        self.assertRegex(repr(foo.foo),
+               r"<class '%s.foo' at 0x.+>" % foo.__name__)
 
     @unittest.skip('need a suitable object')
     def test_object(self):
@@ -310,7 +310,7 @@
         importlib.invalidate_caches()
         from areallylongpackageandmodulenametotestreprtruncation.areallylongpackageandmodulenametotestreprtruncation import bar
         # Module name may be prefixed with "test.", depending on how run.
-        self.assertEqual(repr(bar.bar), "<class '%s.bar'>" % bar.__name__)
+        self.assertRegex(repr(bar.bar), r"<class '%s.bar' at 0x.+>" % bar.__name__)
 
     def test_instance(self):
         self._check_path_limitations('baz')