示例#1
0
 def test_is_outdated_false(self, mock):
     def side_effected_not_outdated(filename):
         return 2 if filename[-3:] == 'pdf' else 1
     mock.side_effect = side_effected_not_outdated
     lyxfile = LyxFile('somedir/abc.lyx')
     self.assertFalse(lyxfile.is_outdated())
示例#2
0
 def test_is_outdated_true(self, mock):
     def side_effected_outdated(filename):
         return 1 if filename[-3:] == 'pdf' else 2
     mock.side_effect = side_effected_outdated
     lyxfile = LyxFile('somedir/abc.lyx')
     self.assertTrue(lyxfile.is_outdated())