Skip to content

Commit

Permalink
Fix test on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
diegorusso committed Sep 26, 2024
1 parent 6f49f86 commit 876783d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions pyperf/tests/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ def check_args(loops, a, b):


class TestRunner(unittest.TestCase):

maxDiff = None

def create_runner(self, args, **kwargs):
# hack to be able to create multiple instances per process
pyperf.Runner._created.clear()
Expand Down Expand Up @@ -176,8 +173,8 @@ def test_pipe_with_timeout(self):
with mock.patch('pyperf._utils.select.select',
return_value=(True, False, False)):
bench_json = rpipe.read_text(timeout=0.1)
self.assertEqual(bench_json,
tests.benchmark_as_json(result.bench))
self.assertEqual(bench_json.rstrip(),
tests.benchmark_as_json(result.bench).rstrip())

def test_json_exists(self):
with tempfile.NamedTemporaryFile('wb+') as tmp:
Expand Down

0 comments on commit 876783d

Please sign in to comment.