Skip to content

Commit

Permalink
Make test_resource_limit() less fragile
Browse files Browse the repository at this point in the history
  • Loading branch information
khaeru committed May 26, 2021
1 parent 1c78303 commit 05ad01c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ixmp/tests/test_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ def test_resource_limit(resource_limit, test_mp):
"""Exercise :func:`memory_usage` and :func:`resource_limit`."""
# TODO expand to cover other missed lines in those functions

info0 = memory_usage("setup")
memory_usage("setup")

s = ixmp.TimeSeries(test_mp, **models["h2g2"], version="new")

info1 = memory_usage("1 TimeSeries")
memory_usage("1 TimeSeries")

del s

assert info0.python <= info1.python
# commented: this is nondeterministic, not always true
# assert info0.python <= info1.python

0 comments on commit 05ad01c

Please sign in to comment.