From 0e83683b3e1f2abddfb9142d9447274f5cd0beda Mon Sep 17 00:00:00 2001 From: Caden Myers Date: Sun, 27 Oct 2024 16:28:17 -0400 Subject: [PATCH 1/4] surpress runtime warning for applycutoff function --- tests/integration_test.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/integration_test.py b/tests/integration_test.py index 44388dd..cd16228 100644 --- a/tests/integration_test.py +++ b/tests/integration_test.py @@ -1,4 +1,5 @@ import unittest +import warnings import h5py import numpy as np @@ -105,7 +106,9 @@ def test_applycutoff_range1(self): self.test_gui.qmaxentry.insert(0, "40") # when - self.test_gui.applycutoff() + with warnings.catch_warnings(): + warnings.simplefilter("ignore", category=RuntimeWarning) + self.test_gui.applycutoff() result = self.test_gui.cube # then @@ -119,7 +122,9 @@ def test_applycutoff_range2(self): self.test_gui.qmaxentry.insert(0, "35") # when - self.test_gui.applycutoff() + with warnings.catch_warnings(): + warnings.simplefilter("ignore", category=RuntimeWarning) + self.test_gui.applycutoff() result = self.test_gui.cube # then From a7eaa751297253ec41732fbd0ee3bf12ce1bedcd Mon Sep 17 00:00:00 2001 From: Caden Myers Date: Sun, 27 Oct 2024 16:31:11 -0400 Subject: [PATCH 2/4] news --- news/test.rst | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 news/test.rst diff --git a/news/test.rst b/news/test.rst new file mode 100644 index 0000000..71c6190 --- /dev/null +++ b/news/test.rst @@ -0,0 +1,23 @@ +**Added:** + +* + +**Changed:** + +* + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* Surpressed `RuntimeWarning` error for the `applycutoff` function + +**Security:** + +* From 0216d00dd5d32157cc327749dea254dd57fef50a Mon Sep 17 00:00:00 2001 From: Caden Myers Date: Sun, 27 Oct 2024 16:33:14 -0400 Subject: [PATCH 3/4] edit --- news/test.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/news/test.rst b/news/test.rst index 71c6190..16ba96b 100644 --- a/news/test.rst +++ b/news/test.rst @@ -16,7 +16,7 @@ **Fixed:** -* Surpressed `RuntimeWarning` error for the `applycutoff` function +* Surpressed `RuntimeWarning` for the `applycutoff` function **Security:** From b7aca2e3a1cdad8c64e41a9629f3b4b065786171 Mon Sep 17 00:00:00 2001 From: Simon Billinge Date: Tue, 29 Oct 2024 23:38:41 -0400 Subject: [PATCH 4/4] news tweak --- news/test.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/news/test.rst b/news/test.rst index 16ba96b..225407f 100644 --- a/news/test.rst +++ b/news/test.rst @@ -16,7 +16,7 @@ **Fixed:** -* Surpressed `RuntimeWarning` for the `applycutoff` function +* Surpress `RuntimeWarning` in tests for the `applycutoff` function **Security:**