summaryrefslogtreecommitdiff
path: root/unit_tests
diff options
context:
space:
mode:
authorjpellerin <devnull@localhost>2009-09-27 10:51:08 -0400
committerjpellerin <devnull@localhost>2009-09-27 10:51:08 -0400
commit4bd9770fdf93156258ed57a9d23739174951fde8 (patch)
tree756ec2f22fb2b2d1600561e2558a17bcbe02ab73 /unit_tests
parent908bbab10b0ca2fa90957ededf183a39d74ec752 (diff)
downloadnose-4bd9770fdf93156258ed57a9d23739174951fde8.tar.gz
Fixed tests that failed under windows/py25
Diffstat (limited to 'unit_tests')
-rw-r--r--unit_tests/test_config_defaults.rst14
-rw-r--r--unit_tests/test_core.py6
2 files changed, 11 insertions, 9 deletions
diff --git a/unit_tests/test_config_defaults.rst b/unit_tests/test_config_defaults.rst
index 6452b40..944d370 100644
--- a/unit_tests/test_config_defaults.rst
+++ b/unit_tests/test_config_defaults.rst
@@ -82,7 +82,7 @@ file contains the bad option name or value
... os.path.join(support, "invalid_value.cfg"),
... os.path.join(support, "b.cfg")])
... # doctest: +ELLIPSIS
- error: Error reading config file '.../invalid_value.cfg': option 'verbosity': invalid integer value: 'spam'
+ error: Error reading config file '...invalid_value.cfg': option 'verbosity': invalid integer value: 'spam'
Invalid config files
@@ -98,16 +98,16 @@ Invalid config files
>>> options, args = parse([], os.path.join(support, "invalid.cfg"))
... # doctest: +ELLIPSIS
- error: Error reading config file '.../invalid.cfg': File contains no section headers.
- file: .../invalid.cfg, line: 1
+ error: Error reading config file '...invalid.cfg': File contains no section headers.
+ file: ...invalid.cfg, line: 1
'spam\n'
(filenames, length == 1)
>>> options, args = parse([], [os.path.join(support, "invalid.cfg")])
... # doctest: +ELLIPSIS
- error: Error reading config file '.../invalid.cfg': File contains no section headers.
- file: .../invalid.cfg, line: 1
+ error: Error reading config file '...invalid.cfg': File contains no section headers.
+ file: ...invalid.cfg, line: 1
'spam\n'
(filenames, length > 1)
@@ -119,8 +119,8 @@ file is bad
... os.path.join(support, "invalid.cfg"),
... os.path.join(support, "b.cfg")])
... # doctest: +ELLIPSIS
- error: Error reading config file '.../invalid.cfg': File contains no section headers.
- file: .../invalid.cfg, line: 1
+ error: Error reading config file '...invalid.cfg': File contains no section headers.
+ file: ...invalid.cfg, line: 1
'spam\n'
diff --git a/unit_tests/test_core.py b/unit_tests/test_core.py
index 0ccd466..6fb6cef 100644
--- a/unit_tests/test_core.py
+++ b/unit_tests/test_core.py
@@ -1,3 +1,4 @@
+import os
import sys
import unittest
from cStringIO import StringIO
@@ -57,7 +58,7 @@ class TestUsage(unittest.TestCase):
nose.__loader__ = fake_zipimporter()
usage_txt = nose.core.TestProgram.usage()
self.assertEqual(usage_txt, '<usage>')
- self.assertEqual(requested_data, ['nose/usage.txt'])
+ self.assertEqual(requested_data, ['nose%susage.txt' % os.sep])
finally:
if existing_loader is not Undefined:
nose.__loader__ = existing_loader
@@ -83,7 +84,8 @@ class TestUsage(unittest.TestCase):
nose.__loader__ = fake_zipimporter()
usage_txt = nose.core.TestProgram.usage()
self.assertEqual(usage_txt, '<usage>')
- self.assertEqual(requested_data, ['PREFIX/nose/usage.txt'])
+ self.assertEqual(requested_data,
+ ['PREFIX%snose%susage.txt' % (os.sep, os.sep)])
finally:
if existing_loader is not Undefined:
nose.__loader__ = existing_loader