示例#1
0
 def test_012(self):
     """ Page path setter - None """
     page = Page()
     page.path = None
     self.assertEqual(page.path, None)
示例#2
0
 def test_010(self):
     """ Page path setter - not a string """
     page = Page()
     with pytest.raises(TypeError):
         page.path = 12
示例#3
0
 def test_011(self):
     """ Page path setter - not a valid file """
     page = Page()
     with pytest.raises(FileNotFoundError):
         page.path = 'files/nonexist.txt'
示例#4
0
 def test_009(self):
     """ Page path getter/setter """
     page = Page()
     self.assertEqual(page.path, None)
     page.path = "files/test.txt"
     self.assertEqual(page.path, 'files/test.txt')