File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change 1
1
"""
2
2
Tests for the pandas.io.common functionalities
3
3
"""
4
- import nose
5
4
import mmap
6
5
import os
7
6
from os .path import isabs
@@ -98,15 +97,18 @@ def setUp(self):
98
97
'test_mmap.csv' )
99
98
100
99
def test_constructor_bad_file (self ):
101
- if is_platform_windows ():
102
- raise nose .SkipTest ("skipping construction error messages "
103
- "tests on windows" )
104
-
105
100
non_file = StringIO ('I am not a file' )
106
101
non_file .fileno = lambda : - 1
107
102
108
- msg = "Invalid argument"
109
- tm .assertRaisesRegexp (mmap .error , msg , common .MMapWrapper , non_file )
103
+ # the error raised is different on Windows
104
+ if is_platform_windows ():
105
+ msg = "The parameter is incorrect"
106
+ err = OSError
107
+ else :
108
+ msg = "Invalid argument"
109
+ err = mmap .error
110
+
111
+ tm .assertRaisesRegexp (err , msg , common .MMapWrapper , non_file )
110
112
111
113
target = open (self .mmap_file , 'r' )
112
114
target .close ()
You can’t perform that action at this time.
0 commit comments