Пример #1
0
 def setUp(self):
     self.cursesScreen = curses.StandardScreen()
     self.prg = app.ci_program.CiProgram()
     self.prg.setUpCurses(self.cursesScreen)
     # For testing, use the internal clipboard. Using the system clipboard
     # can create races between tests running in parallel.
     self.prg.clipboard.setOsHandlers(None, None)
Пример #2
0
 def setUp(self):
     if True:
         # The buffer manager will retain the test file in RAM. Reset it.
         try:
             del sys.modules['app.buffer_manager']
             import app.buffer_manager
         except KeyError:
             pass
     if os.path.isfile(kTestFile):
         os.unlink(kTestFile)
     self.assertFalse(os.path.isfile(kTestFile))
     self.cursesScreen = curses.StandardScreen()
     self.prg = app.ci_program.CiProgram(self.cursesScreen)
Пример #3
0
 def setUp(self):
     if True:
         # The buffer manager will retain the test file in RAM. Reset it.
         try:
             del sys.modules['app.buffer_manager']
             import app.buffer_manager
         except KeyError:
             pass
     if True:
         # The prefs may contain old test settings in RAM. Reset it.
         try:
             del sys.modules['app.prefs']
             import app.prefs
             app.prefs.prefsDirectory = tempfile.mkdtemp()
             #print(u"\nPrefs from this test are at:\n", app.prefs.prefsDirectory)
         except KeyError:
             pass
     self.cursesScreen = curses.StandardScreen()
     self.prg = app.ci_program.CiProgram(self.cursesScreen)
Пример #4
0
 def setUp(self):
     self.cursesScreen = curses.StandardScreen()
     self.prg = app.ci_program.CiProgram()
     self.prg.setUpCurses(self.cursesScreen)