Skip to content

Commit

Permalink
Update test_txt_exports
Browse files Browse the repository at this point in the history
  • Loading branch information
KulaginVladimir committed Jan 7, 2024
1 parent 9007e8a commit 375fb16
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/unit/test_exports/test_txt_exports.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@


class TestWrite:
@pytest.fixture
def my_export(self, tmpdir):
@pytest.fixture(params=[[1, 2, 3], None])
def my_export(self, tmpdir, request):
d = tmpdir.mkdir("test_folder")
my_export = TXTExports(
["solute", "T"], ["solute_label", "T_label"], [1, 2, 3], str(Path(d))
["solute", "T"], ["solute_label", "T_label"], request.param, str(Path(d))
)

return my_export
Expand All @@ -22,4 +22,4 @@ def test_txt_exports_times(self, my_export):

def test_error_when_fields_and_labels_have_different_lengths():
with pytest.raises(ValueError, match="Number of fields to be exported"):
TXTExports(["solute", "T"], [1], ["solute_label"])
TXTExports(["solute", "T"], ["solute_label"], [1])

0 comments on commit 375fb16

Please sign in to comment.