Add a test for AppendLineParser.clear

This commit is contained in:
Florian Bruhin 2016-06-08 10:11:59 +02:00
parent cca26f0f13
commit 33bcced4a2

View File

@ -147,6 +147,12 @@ class TestAppendLineParser:
lineparser.save()
assert lineparser._data == self._get_expected(new_data)
def test_clear(self, lineparser):
lineparser.new_data = ['this', 'should', 'be', 'cleared']
lineparser.clear()
lineparser.save()
assert lineparser._data == ""
def test_iter_without_open(self, lineparser):
"""Test __iter__ without having called open()."""
with pytest.raises(ValueError):