Skip to content

Commit

Permalink
Update test function test_emulate_none() from class TestSystemCPUCoun…
Browse files Browse the repository at this point in the history
…tPhysical()
  • Loading branch information
jandrovins committed Apr 15, 2020
1 parent f0d5b3b commit 8f5e7ee
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions psutil/tests/test_linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -689,10 +689,8 @@ def test_against_lscpu(self):
self.assertEqual(psutil.cpu_count(logical=False), len(core_ids))

def test_emulate_none(self):
with mock.patch('glob.glob', return_value=[]) as m1:
with mock.patch('psutil._common.open', create=True) as m2:
self.assertIsNone(psutil._pslinux.cpu_count_physical())
assert m1.called
with mock.patch('psutil._common.open', create=True) as m2:
self.assertIsNone(psutil._pslinux.cpu_count_physical())
assert m2.called


Expand Down

0 comments on commit 8f5e7ee

Please sign in to comment.