diff --git a/unitest.py b/unitest.py index 4a0a70b8..e2a496c4 100755 --- a/unitest.py +++ b/unitest.py @@ -21,7 +21,6 @@ """Glances unitary tests suite.""" import time -from tracemalloc import Snapshot import unittest from glances.main import GlancesMain @@ -39,6 +38,9 @@ from glances.compat import subsample, range from glances.secure import secure_popen from glances.compat import PY3 +if PY3: + from tracemalloc import Snapshot + # Global variables # =================