def test_012(self): """ Page path setter - None """ page = Page() page.path = None self.assertEqual(page.path, None)
def test_010(self): """ Page path setter - not a string """ page = Page() with pytest.raises(TypeError): page.path = 12
def test_011(self): """ Page path setter - not a valid file """ page = Page() with pytest.raises(FileNotFoundError): page.path = 'files/nonexist.txt'
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')