Skip to content

Commit

Permalink
Get pypy3 passing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jnwatson committed Oct 7, 2020
1 parent 63c7dff commit 2d0f939
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ python:
- 3.8
- 3.9-dev
- pypy
# - pypy3
- pypy3
# - nightly

env:
Expand Down
8 changes: 4 additions & 4 deletions tests/cursor_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def setUp(self, redo=False):
self.txn = self.env.begin(write=True)
self.c = self.txn.cursor()

@unittest.skipIf(sys.platform != 'linux', "test only works on Linux")
@unittest.skipIf(not sys.platform.startswith('linux'), "test only works on Linux")
def test_preload(self):
"""
Test that reading just the key doesn't prefault the value contents, but
Expand All @@ -264,13 +264,13 @@ def test_preload(self):
self.path, self.env = testlib.temp_env(path=self.path, writemap=True)
self.txn = self.env.begin(write=True, buffers=True)
self.c = self.txn.cursor()
minflts_before = resource.getrusage(resource.RUSAGE_THREAD)[6]
minflts_before = resource.getrusage(resource.RUSAGE_SELF)[6]
self.c.set_key(B('a'))
assert self.c.key() == B('a')
minflts_after_key = resource.getrusage(resource.RUSAGE_THREAD)[6]
minflts_after_key = resource.getrusage(resource.RUSAGE_SELF)[6]

self.c.value()
minflts_after_value = resource.getrusage(resource.RUSAGE_THREAD)[6]
minflts_after_value = resource.getrusage(resource.RUSAGE_SELF)[6]

epsilon = 20

Expand Down

0 comments on commit 2d0f939

Please sign in to comment.