John A Meinel wrote:
> 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.
>
Even with this patch I still get:
======================================================================
FAIL: test_tty_default_without_columns
(bzrlib.tests.test_osutils.TestTerminalWidth)
- ----------------------------------------------------------------------
Traceback (most recent call last):
File "d:\bzr\bzr.dev\bzrlib\tests\test_osutils.py", line 1955, in
test_tty_default_without_columns
self.assertEquals(None, osutils.terminal_width())
AssertionError: not equal:
a = None
b = 100
I assume the issue is that Windows is always returning a value even
though we expect it not to? (100 is the correct column width in my case.)
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
John A Meinel wrote: tests/test_ osutils. py' tests/test_ osutils. py 2009-12-04 10:09:11 +0000 tests/test_ osutils. py 2009-12-04 17:59:07 +0000 ls(None, osutils. terminal_ width() ) (self): ed('termios is not available')
> A possible fix is:
> === modified file 'bzrlib/
> --- bzrlib/
> +++ bzrlib/
> @@ -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.assertEqua
>
> def test_TIOCGWINSZ
> + if termios is None:
> + raise tests.TestSkipp
> # 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.
>
Even with this patch I still get: ======= ======= ======= ======= ======= ======= ======= ======= ======= default_ without_ columns tests.test_ osutils. TestTerminalWid th) ------- ------- ------- ------- ------- ------- ------- ------- ------- bzr.dev\ bzrlib\ tests\test_ osutils. py", line 1955, in default_ without_ columns
=======
FAIL: test_tty_
(bzrlib.
- -------
Traceback (most recent call last):
File "d:\bzr\
test_tty_
self. assertEquals( None, osutils. terminal_ width() )
AssertionError: not equal:
a = None
b = 100
I assume the issue is that Windows is always returning a value even
though we expect it not to? (100 is the correct column width in my case.)
John
=:->
-----BEGIN PGP SIGNATURE----- enigmail. mozdev. org/
ZcBUACgkQJdeBCY SNAAMn9QCgnv64U rwChqHED8qpVPwL dht3 fENCi1XVSlzzIFo PgmmaOMSE
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAks
pIMAnA8+
=DUZ2
-----END PGP SIGNATURE-----