From 8f5e7eef8ea26e2f4d64c39726db8ae59ed92cd2 Mon Sep 17 00:00:00 2001 From: Vincent Alejandro Arcila Larrea Date: Tue, 14 Apr 2020 20:50:25 -0500 Subject: [PATCH] Update test function test_emulate_none() from class TestSystemCPUCountPhysical() --- psutil/tests/test_linux.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/psutil/tests/test_linux.py b/psutil/tests/test_linux.py index e51f8bd573..01d38983e3 100755 --- a/psutil/tests/test_linux.py +++ b/psutil/tests/test_linux.py @@ -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