Skip to content

Commit

Permalink
fixed tests in gui_git
Browse files Browse the repository at this point in the history
  • Loading branch information
rgerum committed Jan 21, 2025
1 parent 2876143 commit af27818
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions saenopy/gui/material_fit/gui_fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,10 @@ def run(self):
parts = []
colors = []
for d in self.data:
if isinstance(d[2]["col1"], float):
d[2]["col1"] = int(d[2]["col1"])
if isinstance(d[2]["col2"], float):
d[2]["col2"] = int(d[2]["col2"])
if d[1] and d[2]["type"] != "none":
colors.append(d[3])
params = d[2]["params"]
Expand Down
2 changes: 1 addition & 1 deletion test/test_use_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ def test_fit(monkeypatch, catch_popup_error, random_path):
[1.10e+00, 2.02e-01]])
np.savetxt("stretch.txt", stretch)

monkeypatch.setattr(QtWidgets.QFileDialog, "getOpenFileName", lambda *args: "stretch.txt")
monkeypatch.setattr(QtWidgets.QFileDialog, "getOpenFileName", lambda *args: ("stretch.txt",))
window.add_measurement()

window.list.setCurrentRow(2)
Expand Down

0 comments on commit af27818

Please sign in to comment.