Skip to content

Commit 0d81085

Browse files
authored
Merge pull request #138 from maxmind/greg/fix-sanitizer-test
Fix address sanitizer test
2 parents 2daa33a + cc9f371 commit 0d81085

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

.github/workflows/address-sanitizer.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,16 @@ jobs:
2727
- name: Install dependencies
2828
run: |
2929
python -m pip install --upgrade pip
30-
pip install setuptools tox tox-gh-actions wheel
30+
pip install pytest setuptools wheel
3131
32-
- name: Test with tox
33-
run: tox
32+
- name: Install
33+
run: pip install .
3434
env:
35-
LD_PRELOAD: libasan.so.6
35+
CFLAGS: "-Werror -Wall -Wextra"
3636
MAXMINDDB_REQUIRE_EXTENSION: 1
37+
38+
- name: Test
39+
run: pytest
40+
env:
41+
LD_PRELOAD: libasan.so.6
3742
MM_FORCE_EXT_TESTS: 1

tests/reader_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ class TestMemoryReader(BaseTestReader, unittest.TestCase):
675675

676676
class TestFDReader(BaseTestReader, unittest.TestCase):
677677
def setUp(self):
678-
self.open_database_patcher = mock.patch("reader_test.open_database")
678+
self.open_database_patcher = mock.patch(__name__ + ".open_database")
679679
self.addCleanup(self.open_database_patcher.stop)
680680
self.open_database = self.open_database_patcher.start()
681681
self.open_database.side_effect = get_reader_from_file_descriptor

0 commit comments

Comments
 (0)