def test_get_fs_type(self): fstypes = ["xfs", "ext4", "ext", "vfat", "ntfs"] # test positile fstype = util.get_fs_type(os.path.realpath(__file__)) self.assertTrue(fstype in fstypes) # test negative fstype = util.get_fs_type("bad/path") self.assertEqual(fstype, None)
def test_get_fs_type(self): fstypes = ["xfs", "ext4", "ext", "vfat", "ntfs"] # test positile fstype = util.get_fs_type(os.path.realpath(__file__)) self.assertTrue(fstype in fstypes) # test negative def callback(): util.get_fs_type("bad/path") self.assertRaises(exceptions.PartitionTypeNotFound, callback)
def callback(): util.get_fs_type("bad/path")