From 6e9312efb73b70f62a63c77da17f358aadddaf24 Mon Sep 17 00:00:00 2001 From: Emmanuelle Vargas-Gonzalez Date: Thu, 29 Nov 2018 11:48:14 -0500 Subject: [PATCH] fix test memory datastore teardown --- stix2/test/v20/test_datastore_memory.py | 4 ++-- stix2/test/v21/test_datastore_memory.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/stix2/test/v20/test_datastore_memory.py b/stix2/test/v20/test_datastore_memory.py index 279026c..8bb7e72 100644 --- a/stix2/test/v20/test_datastore_memory.py +++ b/stix2/test/v20/test_datastore_memory.py @@ -148,7 +148,7 @@ def fs_mem_store(request, mem_store): def fin(): # teardown, executed regardless of exception - shutil.rmtree(os.path.dirname(filename)) + shutil.rmtree(os.path.dirname(saved_location)) request.addfinalizer(fin) return saved_location @@ -163,7 +163,7 @@ def fs_mem_store_no_name(request, mem_store): def fin(): # teardown, executed regardless of exception - shutil.rmtree(os.path.dirname(filename)) + shutil.rmtree(os.path.dirname(saved_location)) request.addfinalizer(fin) return saved_location diff --git a/stix2/test/v21/test_datastore_memory.py b/stix2/test/v21/test_datastore_memory.py index 3a76fbc..f919bd3 100644 --- a/stix2/test/v21/test_datastore_memory.py +++ b/stix2/test/v21/test_datastore_memory.py @@ -156,7 +156,7 @@ def fs_mem_store(request, mem_store): def fin(): # teardown, executed regardless of exception - shutil.rmtree(os.path.dirname(filename)) + shutil.rmtree(os.path.dirname(saved_location)) request.addfinalizer(fin) return saved_location @@ -171,7 +171,7 @@ def fs_mem_store_no_name(request, mem_store): def fin(): # teardown, executed regardless of exception - shutil.rmtree(os.path.dirname(filename)) + shutil.rmtree(os.path.dirname(saved_location)) request.addfinalizer(fin) return saved_location