コード例 #1
0
 def setUp(self):
     """Patch the ctypes import and initialize a stream and UI instance."""
     super(FakeWin32Test, self).setUp()
     self._orig_ctypes = terminal_interface_win32.ctypes
     ctypes = FakeModule.create_dotted('ctypes.windll.kernel32')
     ctypes.windll.kernel32.SetConsoleTextAttribute = self._handle_setattr
     terminal_interface_win32.ctypes = ctypes
     self.stream._hConsole = object()
コード例 #2
0
ファイル: ui_tests.py プロジェクト: metakgp/batman
 def setUp(self):
     """Patch the ctypes import and initialize a stream and UI instance."""
     super(FakeWin32Test, self).setUp()
     self._orig_ctypes = terminal_interface_win32.ctypes
     ctypes = FakeModule.create_dotted('ctypes.windll.kernel32')
     ctypes.windll.kernel32.SetConsoleTextAttribute = self._handle_setattr
     terminal_interface_win32.ctypes = ctypes
     self.stream._hConsole = object()