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 0bff660..09de9c2 100644
--- a/sasmodels/direct_model.py
+++ b/sasmodels/direct_model.py
@@ -432,6 +432,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',
@@ -595,6 +601,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
