Comment 2 for bug 492561

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

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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/

iEYEARECAAYFAksZcBUACgkQJdeBCYSNAAMn9QCgnv64UrwChqHED8qpVPwLdht3
pIMAnA8+fENCi1XVSlzzIFoPgmmaOMSE
=DUZ2
-----END PGP SIGNATURE-----