class TestTrashInfoParser_with_empty_trashinfo: def setUp(self): self.parser = TrashInfoParser(contents=an_empty_trashinfo(), volume_path='/') def test_it_raises_error_on_parsing_original_location(self): with assert_raises(ParseError): self.parser.original_location()
def setUp(self): self.parser = TrashInfoParser(contents=an_empty_trashinfo(), volume_path='/')
def test_1(self): parser = TrashInfoParser("[Trash Info]\n" "Path=/foo.txt\n", volume_path = '/') assert_equals('/foo.txt', parser.original_location())