Skip to content

Commit c778140

Browse files
author
Cristiano Köhler
committed
Added cleanup if variables were not originally set
1 parent 6b0e57e commit c778140

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

elephant/test/test_asset.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -842,8 +842,13 @@ def cleanUpClass(cls):
842842
# Restore environment flags
843843
if cls.use_cuda:
844844
os.environ["ELEPHANT_USE_CUDA"] = cls.use_cuda
845+
else:
846+
os.environ.pop("ELEPHANT_USE_CUDA")
847+
845848
if cls.use_opencl:
846849
os.environ["ELEPHANT_USE_OPENCL"] = cls.use_opencl
850+
else:
851+
os.environ.pop("ELEPHANT_USE_OPENCL")
847852

848853

849854
@unittest.skipUnless(HAVE_SKLEARN, 'requires sklearn')

0 commit comments

Comments
 (0)