Skip to content

Commit d16cefb

Browse files
committed
Add 'System' to the list of libc equivalents
This is apparently needed on some OSX systems. Closes #188.
1 parent bb1ce28 commit d16cefb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

fakeredis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def iteritems(d):
8888

8989
DATABASES = {}
9090

91-
_libc_library = find_library('c') or find_library('msvcrt')
91+
_libc_library = find_library('c') or find_library('msvcrt') or find_library('System')
9292

9393
if not _libc_library:
9494
raise ImportError('fakeredis: unable to find libc or equivalent')

test_fakeredis.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3880,7 +3880,7 @@ def test_can_pass_through_extra_args(self):
38803880
class TestImportation(unittest.TestCase):
38813881
def test_searches_for_c_stdlib_and_raises_if_missing(self):
38823882
"""
3883-
Verifies that fakeredis checks for both libc and msvcrt when
3883+
Verifies that fakeredis checks for multiple C library implementations
38843884
looking for a strtod implementation and that it fails fast when neither
38853885
is found.
38863886
"""
@@ -3898,7 +3898,7 @@ def test_searches_for_c_stdlib_and_raises_if_missing(self):
38983898
with self.assertRaises(ImportError):
38993899
reload(fakeredis)
39003900

3901-
self.assertEqual(set(['c', 'msvcrt']), searched_libraries)
3901+
self.assertEqual(set(['c', 'msvcrt', 'System']), searched_libraries)
39023902
finally:
39033903
ctypes.util.find_library = old_find_library
39043904

0 commit comments

Comments
 (0)