def testDoesNotSyntacticallyIncorrectLineHasFilesystem(self): self.assertFalse(fstab.Line("yo").has_filesystem())
def testDoesNotAllowSettingDeviceWhenUnset(self): line = fstab.Line("yo") self.assertRaises(Exception, setattr, line, "device", "/dev")
def testDoesNotThinkCommentHasFilesystem(self): self.assertFalse(fstab.Line("# foo").has_filesystem())
def testDoesNotThinkLineWithWhiteSpaceHasFilesystem(self): self.assertFalse(fstab.Line(" \t").has_filesystem())
def testDoesNotThinkEmptyLineHasFilesystem(self): self.assertFalse(fstab.Line("").has_filesystem())
def testSetsRawToWhateverTheConstructorIsGiven(self): # Note that we set the line to something syntactically incorrect. # This is on purpose. The class is supposed to handle that. line = fstab.Line("yo") self.assertEqual(line.raw, "yo")
def setUp(self): self.line = fstab.Line("/dev / type opt,ions 0 1")