Skip to content

Commit c397f4c

Browse files
committed
Add test compatibility on Windows.
1 parent 107c6cf commit c397f4c

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎distutils/unixccompiler.py‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ def _library_root(dir):
361361
return os.path.join(match.group(1), dir[1:]) if apply_root else dir
362362

363363
def find_library_file(self, dirs, lib, debug=0):
364-
"""
364+
r"""
365365
Second-guess the linker with not much hard
366366
data to go on: GCC seems to prefer the shared library, so
367367
assume that *all* Unix C compilers do,
@@ -372,15 +372,15 @@ def find_library_file(self, dirs, lib, debug=0):
372372
>>> monkeypatch = getfixture('monkeypatch')
373373
>>> monkeypatch.setattr(os.path, 'exists', lambda d: 'existing' in d)
374374
>>> dirs = ('/foo/bar/missing', '/foo/bar/existing')
375-
>>> compiler.find_library_file(dirs, 'abc')
375+
>>> compiler.find_library_file(dirs, 'abc').replace('\\', '/')
376376
'/foo/bar/existing/libabc.dylib'
377-
>>> compiler.find_library_file(reversed(dirs), 'abc')
377+
>>> compiler.find_library_file(reversed(dirs), 'abc').replace('\\', '/')
378378
'/foo/bar/existing/libabc.dylib'
379379
>>> monkeypatch.setattr(os.path, 'exists',
380380
... lambda d: 'existing' in d and '.a' in d)
381-
>>> compiler.find_library_file(dirs, 'abc')
381+
>>> compiler.find_library_file(dirs, 'abc').replace('\\', '/')
382382
'/foo/bar/existing/libabc.a'
383-
>>> compiler.find_library_file(reversed(dirs), 'abc')
383+
>>> compiler.find_library_file(reversed(dirs), 'abc').replace('\\', '/')
384384
'/foo/bar/existing/libabc.a'
385385
"""
386386
lib_names = (

0 commit comments

Comments
 (0)