Skip to content
Permalink
Browse files

store: Added test for handling empty file

  • Loading branch information
LarsMichelsen committed Sep 29, 2016
1 parent f17ee3a commit f62401fa5be2e596a7bcf6d2929ac3ad72f7d978
Showing with 7 additions and 0 deletions.
  1. +7 −0 tests/lib/test_store.py
@@ -17,6 +17,13 @@ def test_load_data_from_file_not_existing(tmpdir):
assert data == "DEFAULT"


def test_load_data_from_file_empty(tmpdir):
locked_file = tmpdir.join("test")
locked_file.write("")
data = store.load_data_from_file("%s/x" % tmpdir, "DEF")
assert data == "DEF"


def test_load_data_not_locked(tmpdir):
locked_file = tmpdir.join("locked_file")
locked_file.write("[1, 2]")

0 comments on commit f62401f

Please sign in to comment.
You can’t perform that action at this time.