'Test if clear() empties its file.'

def test_clear(self, tmpdir, lineparser):

    lineparser.data = ['one', 'two']
    lineparser.save()
    assert ((tmpdir / 'file').read() == 'one\ntwo\n')
    lineparser.clear()
    assert (not lineparser.data)
    assert ((tmpdir / 'file').read() == '')
