Skip to content

Commit

Permalink
testCache testBogusObject: allow ref counts of none to go down.
Browse files Browse the repository at this point in the history
This happens on Python 3.7, evidinced by Appveyor (https://ci.appveyor.com/project/jimfulton/zodb/build/1.0.176/job/ehutnhnvbm28w5xl) but not travis because we run coverage on travis, and coverage disables refcounts of None.
  • Loading branch information
jamadden committed Aug 24, 2018
1 parent b8308c6 commit af33385
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/ZODB/tests/testCache.py
Expand Up @@ -378,7 +378,12 @@ def add(key, obj):
# structure that adds a new reference to None for each executed
# line of code, which interferes with this test. So check it
# only if we're running without coverage tracing.
self.assertEqual(rc(None), nones)

# On Python 3.7, we can see the value of reference counts
# to None actually go *down* by a few. Possibly it has to
# do with the lazy tracking of frames?
# (https://github.com/python/cpython/commit/5a625d0aa6a6d9ec6574ee8344b41d63dcb9897e)
self.assertLessEqual(rc(None), nones)

def testTwoCaches(self):
jar2 = StubDataManager()
Expand Down

0 comments on commit af33385

Please sign in to comment.