+ # Starting with Python 3.12, `None` is immortal: its reference
+ # count operations are no-op. Skip this test in that case.
+ before = sys.getrefcount(None)
+ dummy = None # noqa: F841
+
+ if before == sys.getrefcount(None):
+ raise unittest.SkipTest("`None` is immortal")
+