Skip to content

Commit f36e54a

Browse files
authored
Merge pull request #656 from bobmyhill/remove_unused_testcode
removed unused test code
2 parents d56f9dd + e30e023 commit f36e54a

File tree

2 files changed

+2
-44
lines changed

2 files changed

+2
-44
lines changed

tests/test_elasticsolution.py

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -152,23 +152,6 @@ def __init__(self, molar_fractions=None):
152152
burnman.ElasticSolution.__init__(self, molar_fractions)
153153

154154

155-
class two_site_ss_asymmetric(burnman.ElasticSolution):
156-
# Three-endmember, two site asymmetric solid solution
157-
def __init__(self, molar_fractions=None):
158-
self.name = "two_site_ss (asymmetric)"
159-
self.solution_model = ElasticAsymmetricRegularSolution(
160-
endmembers=[
161-
[pyrope(), "[Mg]3[Al]2Si3O12"],
162-
[pyrope(), "[Fe]3[Al]2Si3O12"],
163-
[pyrope(), "[Mg]3[Mg1/2Si1/2]2Si3O12"],
164-
],
165-
alphas=[1.0, 2.0, 2.0],
166-
energy_interaction=[[10.0e3, 5.0e3], [-10.0e3]],
167-
)
168-
169-
burnman.ElasticSolution.__init__(self, molar_fractions)
170-
171-
172155
class two_site_ss_subregular(burnman.ElasticSolution):
173156
# Three-endmember, two site solid solution
174157
def __init__(self, molar_fractions=None):
@@ -188,25 +171,6 @@ def __init__(self, molar_fractions=None):
188171
burnman.ElasticSolution.__init__(self, molar_fractions)
189172

190173

191-
class two_site_ss_subregular_asymmetric(burnman.ElasticSolution):
192-
# Three-endmember, two site solid solution
193-
def __init__(self, molar_fractions=None):
194-
self.name = "two_site_ss (subregular symmetric)"
195-
self.solution_model = ElasticSubregularSolution(
196-
endmembers=[
197-
[pyrope(), "[Mg]3[Al]2Si3O12"],
198-
[pyrope(), "[Fe]3[Al]2Si3O12"],
199-
[pyrope(), "[Mg]3[Mg1/2Si1/2]2Si3O12"],
200-
],
201-
energy_interaction=[
202-
[[10.0e3, -10.0e3], [5.0e3, 3.0e3]],
203-
[[-10.0e3, -10.0e3]],
204-
],
205-
)
206-
207-
burnman.ElasticSolution.__init__(self, molar_fractions)
208-
209-
210174
class two_site_ss_subregular_ternary(burnman.ElasticSolution):
211175
# Three-endmember, two site solid solution with ternary term
212176
def __init__(self, molar_fractions=None):

tests/test_fitting.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -228,11 +228,8 @@ def test_PTV_data_eos_numerical_failure(self):
228228
PTV = np.array([pressures, temperatures, volumes]).T
229229
params = ["V_0", "K_0", "Kprime_0"]
230230

231-
try:
231+
with self.assertRaises(Exception):
232232
_ = burnman.eos_fitting.fit_PTV_data(fo, params, PTV, verbose=False)
233-
self.assertTrue(False)
234-
except Exception:
235-
self.assertTrue(True)
236233

237234
def test_PTV_data_eos_exception(self):
238235
fo = burnman.minerals.SLB_2011.forsterite()
@@ -248,11 +245,8 @@ def test_PTV_data_eos_exception(self):
248245
PTV = np.array([pressures, temperatures, volumes]).T
249246
params = ["V_0", "K_0", "Kprime_0"]
250247

251-
try:
248+
with self.assertRaises(Exception):
252249
_ = burnman.eos_fitting.fit_PTV_data(fo, params, PTV, verbose=False)
253-
self.assertTrue(False)
254-
except Exception:
255-
self.assertTrue(True)
256250

257251
def test_bounded_solution_fitting(self):
258252
solution = burnman.minerals.SLB_2011.mg_fe_olivine()

0 commit comments

Comments
 (0)