Skip to content

Commit

Permalink
shorten test by using spawn_testproc()
Browse files Browse the repository at this point in the history
  • Loading branch information
giampaolo committed May 18, 2022
1 parent 3398175 commit 1d41e8f
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions psutil/tests/test_linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -1776,16 +1776,8 @@ class TestProcess(PsutilTestCase):

@retry_on_failure()
def test_memory_full_info(self):
testfn = self.get_testfn()
src = textwrap.dedent("""
import time
with open("%s", "w") as f:
time.sleep(10)
""" % testfn)
sproc = self.pyrun(src)
call_until(lambda: os.listdir('.'), "'%s' not in ret" % testfn)
sproc = self.spawn_testproc()
p = psutil.Process(sproc.pid)
time.sleep(.1)
mem = p.memory_full_info()
maps = p.memory_maps(grouped=False)
self.assertAlmostEqual(
Expand Down

0 comments on commit 1d41e8f

Please sign in to comment.