From 0c701766e66912f57374e077f863019ccd645c6f Mon Sep 17 00:00:00 2001 From: kennyballou Date: Tue, 2 Apr 2013 23:13:05 -0600 Subject: Do different tests based on OS --- xnt/tests/taskmisctests.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/xnt/tests/taskmisctests.py b/xnt/tests/taskmisctests.py index bcabf3d..c20e24b 100644 --- a/xnt/tests/taskmisctests.py +++ b/xnt/tests/taskmisctests.py @@ -60,7 +60,10 @@ class TaskMiscTests(unittest.TestCase): def test_which_finds_python(self): """Test which can find python""" - path = xnt.tasks.which("python") + if os.name == 'posix': + path = xnt.tasks.which("python") + else: + path = xnt.tasks.which("python.exe") self.assertIsNotNone(path) def test_which_dne(self): @@ -70,7 +73,10 @@ class TaskMiscTests(unittest.TestCase): def test_python_in_path(self): """Test in_path task""" - self.assertTrue(xnt.tasks.in_path("python")) + if os.name == 'posix': + self.assertTrue(xnt.tasks.in_path("python")) + else: + self.assertTrue(xnt.tasks.in_path("python.exe")) def test_arst_not_in_path(self): """Test not in_path""" -- cgit v1.2.1