Skip to content

Commit

Permalink
Extend test
Browse files Browse the repository at this point in the history
  • Loading branch information
JCZuurmond committed Sep 19, 2024
1 parent 5cc3f48 commit da6e164
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/unit/test_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,11 +478,12 @@ def test_mock_backend_has_rows_written_for_after_first_write(mode) -> None:
assert not mock_backend.has_rows_written_for("a.b.d")


@pytest.mark.parametrize("last_mode", ["append", "overwrite"])
def test_mock_backend_has_rows_written_for_after_two_writes(last_mode) -> None:
@pytest.mark.parametrize("first_mode", ["append", "overwrite"])
@pytest.mark.parametrize("second_mode", ["append", "overwrite"])
def test_mock_backend_has_rows_written_for_after_two_writes(first_mode, second_mode) -> None:
mock_backend = MockBackend()
mock_backend.save_table("a.b.c", [Foo("a1", True), Foo("c2", False)], Foo, "append")
mock_backend.save_table("a.b.c", [Foo("aaa", True), Foo("bbb", False)], Foo, last_mode)
mock_backend.save_table("a.b.c", [Foo("a1", True), Foo("c2", False)], Foo, first_mode)
mock_backend.save_table("a.b.c", [Foo("aaa", True), Foo("bbb", False)], Foo, second_mode)
assert mock_backend.has_rows_written_for("a.b.c")
assert not mock_backend.has_rows_written_for("a.b.d")

Expand Down

0 comments on commit da6e164

Please sign in to comment.