Skip to content

Commit

Permalink
[CI] Test successful write
Browse files Browse the repository at this point in the history
  • Loading branch information
klieret committed Dec 19, 2020
1 parent 191cea4 commit 7fa3f9f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ankipandas/test/test_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,13 @@ def test_write_raises_added(db_path, tmpdir):
for case in cases:
with pytest.raises(ValueError, match=".*would be modified.*"):
col.write(**case, add=False)


@parameterized_paths()
def test_write_added(db_path, tmpdir):
db_path = shutil.copy2(str(db_path), str(tmpdir))
(pathlib.Path(str(tmpdir)) / "backups").mkdir()
col = Collection(db_path)
_init_all_tables(col)
col.notes.add_note("Basic", ["test", "back"], inplace=True)
col.write(add=True)

0 comments on commit 7fa3f9f

Please sign in to comment.