class TestLazyTrashInfoParser_with_empty_trashinfo:
    def setUp(self):
        self.parser = LazyTrashInfoParser(contents=an_empty_trashinfo, volume_path='/')

    def test_it_raises_error_on_parsing_original_location(self):
        with assert_raises(ParseError):
            self.parser.original_location()
Esempio n. 2
0
class TestLazyTrashInfoParser_with_empty_trashinfo:
    def setUp(self):
        self.parser = LazyTrashInfoParser(contents=an_empty_trashinfo,
                                          volume_path='/')

    def test_it_raises_error_on_parsing_original_location(self):
        with assert_raises(ParseError):
            self.parser.original_location()
Esempio n. 3
0
 def setUp(self):
     self.parser = LazyTrashInfoParser(contents=an_empty_trashinfo,
                                       volume_path='/')
Esempio n. 4
0
 def test_1(self):
     parser = LazyTrashInfoParser(lambda: ("[Trash Info]\n"
                                           "Path=/foo.txt\n"),
                                  volume_path='/')
     assert_equals('/foo.txt', parser.original_location())
 def setUp(self):
     self.parser = LazyTrashInfoParser(contents=an_empty_trashinfo, volume_path='/')
 def test_1(self):
     parser = LazyTrashInfoParser(lambda:("[Trash Info]\n"
                                          "Path=/foo.txt\n"), volume_path = '/')
     assert_equals('/foo.txt', parser.original_location())