def test_remove(self): shutil.copy(self.FGLRX, self.NEW) with open(self.NEW) as f: self.assertTrue("fglrx" in f.read()) replace_driver_from_xorg("fglrx", "ati", self.NEW) with open(self.NEW) as f: self.assertFalse("fglrx" in f.read())
def testRemove(self): shutil.copy(self.FGLRX, self.NEW) self.assert_("fglrx" in open(self.NEW).read()) replace_driver_from_xorg("fglrx", "ati", self.NEW) self.assert_(not "fglrx" in open(self.NEW).read())
def testSimple(self): shutil.copy(self.ORIG, self.NEW) replace_driver_from_xorg("fglrx", "ati", self.NEW) self.assert_(open(self.ORIG).read() == open(self.NEW).read())
def test_simple(self): shutil.copy(self.ORIG, self.NEW) replace_driver_from_xorg("fglrx", "ati", self.NEW) with open(self.NEW) as n, open(self.ORIG) as o: self.assertEqual(n.read(), o.read())