diff --git a/CHANGELOG b/CHANGELOG index f52cc5ede..f652eb1f2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,7 @@ Changes between 1.2.1 and XXX - added links to the new capturelog and coverage plugins - (issue87) fix unboundlocal error in assertionold code - (issue86) improve documentation for looponfailing +- fix jython/win32 issues Changes between 1.2.1 and 1.2.0 diff --git a/py/_io/terminalwriter.py b/py/_io/terminalwriter.py index 538975cd8..aa8431b03 100644 --- a/py/_io/terminalwriter.py +++ b/py/_io/terminalwriter.py @@ -133,7 +133,8 @@ def ansi_print(text, esc, file=None, newline=True, flush=False): def should_do_markup(file): return hasattr(file, 'isatty') and file.isatty() \ - and os.environ.get('TERM') != 'dumb' + and os.environ.get('TERM') != 'dumb' \ + and not (os._name == 'nt' and sys.platform.startswith('java')) class TerminalWriter(object): _esctable = dict(black=30, red=31, green=32, yellow=33, diff --git a/py/_path/local.py b/py/_path/local.py index 82e93b8d2..282a1bc6c 100644 --- a/py/_path/local.py +++ b/py/_path/local.py @@ -5,7 +5,7 @@ import sys, os, stat, re, atexit import py from py._path import common -iswin32 = sys.platform == "win32" +iswin32 = sys.platform == "win32" or (os._name == 'nt') class Stat(object): def __getattr__(self, name): diff --git a/testing/path/test_local.py b/testing/path/test_local.py index 89b0f48b4..097e8195f 100644 --- a/testing/path/test_local.py +++ b/testing/path/test_local.py @@ -193,7 +193,7 @@ class TestLocalPath(common.CommonFSTests): assert l[2] == p3 class TestExecutionOnWindows: - pytestmark = py.test.mark.skipif("sys.platform != 'win32'") + pytestmark = py.test.mark.skipif("not (sys.platform == 'win32' or os._name == 'nt')") def test_sysfind(self): x = py.path.local.sysfind('cmd') @@ -201,7 +201,7 @@ class TestExecutionOnWindows: assert py.path.local.sysfind('jaksdkasldqwe') is None class TestExecution: - pytestmark = py.test.mark.skipif("sys.platform == 'win32'") + pytestmark = py.test.mark.skipif("sys.platform == 'win32' or os._name == 'nt'") def test_sysfind(self): x = py.path.local.sysfind('test') @@ -357,7 +357,7 @@ def test_samefile(tmpdir): assert p.samefile(p) class TestWINLocalPath: - pytestmark = py.test.mark.skipif("sys.platform != 'win32'") + pytestmark = py.test.mark.skipif("sys.platform != 'win32' and os._name != 'win32'") def test_owner_group_not_implemented(self, path1): py.test.raises(NotImplementedError, "path1.stat().owner") @@ -406,7 +406,7 @@ class TestWINLocalPath: old.chdir() class TestPOSIXLocalPath: - pytestmark = py.test.mark.skipif("sys.platform == 'win32'") + pytestmark = py.test.mark.skipif("sys.platform == 'win32' or os._name == 'nt'") def test_hardlink(self, tmpdir): linkpath = tmpdir.join('test')