1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
From: Debian Science Maintainers
<debian-science-maintainers@lists.alioth.debian.org>
Date: Tue, 4 Feb 2025 20:58:09 +1100
Subject: Clean up model files from tests
---
sasmodels/direct_model.py | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/sasmodels/direct_model.py b/sasmodels/direct_model.py
index 7662e17..709e9a7 100644
--- a/sasmodels/direct_model.py
+++ b/sasmodels/direct_model.py
@@ -429,6 +429,12 @@ def test_reparameterize():
except Exception:
pass
+ # clean up the dll that was created in the cache as part of the test
+ try:
+ os.remove(derived_model.dllpath)
+ except:
+ pass
+
# Again using insert_after.
insert_after = {
'': 'eccentricity',
@@ -592,6 +598,11 @@ def test_simple_interface():
pars = dict(radius=200, background=background, scale=scale)
assert near(Iq('sphere', [0.1], **pars), [perfect_target*scale + background])
+ # clean up the dll that was created in the cache as part of the test
+ try:
+ os.remove(derived_model.dllpath)
+ except:
+ pass
if __name__ == "__main__":
import logging
|