Skip to content

Commit

Permalink
Import memory_profiler only when it is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
musicinmybrain authored Jan 7, 2024
1 parent 351ec66 commit e8a9235
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from subprocess import Popen, PIPE
from tempfile import TemporaryDirectory
from multiprocessing.dummy import Pool
from memory_profiler import profile as profile_memory

sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))

Expand All @@ -31,6 +30,8 @@
from functools import wraps

PROFILE_MEMORY = os.environ.get("PROFILE_MEMORY", False)
if PROFILE_MEMORY:
from memory_profiler import profile as profile_memory

try:
subprocess.call(
Expand Down

0 comments on commit e8a9235

Please sign in to comment.