Comment 1 for bug 492561

Revision history for this message
John A Meinel (jameinel) wrote : Re: Seftest fails to start on Windows

A possible fix is:
=== modified file 'bzrlib/tests/test_osutils.py'
--- bzrlib/tests/test_osutils.py 2009-12-04 10:09:11 +0000
+++ bzrlib/tests/test_osutils.py 2009-12-04 17:59:07 +0000
@@ -23,7 +23,10 @@
 import socket
 import stat
 import sys
-import termios
+try:
+ import termios
+except ImportError:
+ termios = None
 import time

 from bzrlib import (
@@ -1962,6 +1965,8 @@
         self.assertEquals(None, osutils.terminal_width())

     def test_TIOCGWINSZ(self):
+ if termios is None:
+ raise tests.TestSkipped('termios is not available')
         # bug 63539 is about a termios without TIOCGWINSZ attribute
         exist = True
         try:

But it would be probably better to use a Feature for the test.