|
1 | 1 | import unittest
|
2 |
| -import warnings |
3 | 2 |
|
4 | 3 | import h5py
|
5 | 4 | import numpy as np
|
@@ -98,39 +97,6 @@ def test_fft_testdataset3(self):
|
98 | 97 | # then
|
99 | 98 | self.assertTrue(np.allclose(result, self.test_gofr_cut_15to35px))
|
100 | 99 |
|
101 |
| - def test_applycutoff_range1(self): |
102 |
| - # given |
103 |
| - self.test_gui.plot_plane = lambda *a, **b: () |
104 |
| - self.test_gui.cube = self.test_sofq |
105 |
| - self.test_gui.qminentry.insert(0, "10") |
106 |
| - self.test_gui.qmaxentry.insert(0, "40") |
107 |
| - |
108 |
| - # when |
109 |
| - with warnings.catch_warnings(): |
110 |
| - warnings.simplefilter("ignore", category=RuntimeWarning) |
111 |
| - self.test_gui.applycutoff() |
112 |
| - result = self.test_gui.cube |
113 |
| - |
114 |
| - # then |
115 |
| - self.assertTrue(np.allclose(np.nan_to_num(result), np.nan_to_num(self.test_sofq_cut_10to40px))) |
116 |
| - |
117 |
| - def test_applycutoff_range2(self): |
118 |
| - # given |
119 |
| - self.test_gui.plot_plane = lambda *a, **b: () |
120 |
| - self.test_gui.cube = self.test_sofq |
121 |
| - self.test_gui.qminentry.insert(0, "15") |
122 |
| - self.test_gui.qmaxentry.insert(0, "35") |
123 |
| - |
124 |
| - # when |
125 |
| - with warnings.catch_warnings(): |
126 |
| - warnings.simplefilter("ignore", category=RuntimeWarning) |
127 |
| - self.test_gui.applycutoff() |
128 |
| - result = self.test_gui.cube |
129 |
| - |
130 |
| - # then |
131 |
| - # with self.assertWarns(RuntimeWarning): |
132 |
| - self.assertTrue(np.allclose(np.nan_to_num(result), np.nan_to_num(self.test_sofq_cut_15to35px))) |
133 |
| - |
134 | 100 |
|
135 | 101 | if __name__ == "__main__":
|
136 | 102 | unittest.main()
|
0 commit comments