Exemplo n.º 1
0
 def testMissingEditsFile(self):
     """See if it returns True when edits file is missing"""
     self._writeAndFlush(self.a, self.a, self.a, self.a)
     self.f_edits.close()
     os.remove(self.fn_edits)
     self.failUnless(runrepl.diff(self.fn_prefix))
Exemplo n.º 2
0
 def testBothEmptyCmdsFile(self):
     """See if it returns False when both cmds file are empty"""
     self._writeAndFlush(self.c, self.c, self.a, self.a)
     self.failIf(runrepl.diff(self.fn_prefix))
Exemplo n.º 3
0
 def testEmptyEditsFile(self):
     """See if it returns True when new cmds file is empty"""
     self._writeAndFlush(self.a, self.a, self.a, self.c)
     self.failUnless(runrepl.diff(self.fn_prefix))
Exemplo n.º 4
0
 def testEditsDiffer(self):
     """See if it returns True when the edits differ but cmds do not"""
     self._writeAndFlush(self.a, self.a, self.b, self.a)
     self.failUnless(runrepl.diff(self.fn_prefix))
Exemplo n.º 5
0
 def testSame(self):
     """See if it returns False when no difference"""
     self._writeAndFlush(self.a, self.a, self.b, self.b)
     self.failIf(runrepl.diff(self.fn_prefix))
Exemplo n.º 6
0
 def testMissingEditsFile(self):
     """See if it returns True when edits file is missing"""
     self._writeAndFlush(self.a, self.a, self.a, self.a)
     self.f_edits.close()
     os.remove(self.fn_edits)
     self.failUnless(runrepl.diff(self.fn_prefix))
Exemplo n.º 7
0
 def testEmptyEditsFile(self):
     """See if it returns True when new cmds file is empty"""
     self._writeAndFlush(self.a, self.a, self.a, self.c)
     self.failUnless(runrepl.diff(self.fn_prefix))
Exemplo n.º 8
0
 def testBothEmptyCmdsFile(self):
     """See if it returns False when both cmds file are empty"""
     self._writeAndFlush(self.c, self.c, self.a, self.a)
     self.failIf(runrepl.diff(self.fn_prefix))
Exemplo n.º 9
0
 def testSame(self):
     """See if it returns False when no difference"""
     self._writeAndFlush(self.a, self.a, self.b, self.b)
     self.failIf(runrepl.diff(self.fn_prefix))
Exemplo n.º 10
0
 def testEditsDiffer(self):
     """See if it returns True when the edits differ but cmds do not"""
     self._writeAndFlush(self.a, self.a, self.b, self.a)
     self.failUnless(runrepl.diff(self.fn_prefix))