Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibality with python3.12+ #58

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ jobs:
python setup.py develop
- name: Run Tests
run: |
python setup.py test
python -m unittest discover -s tests -p "*.py"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ __pycache__/
# Distribution / packaging
.Python
env/
venv/
build/
develop-eggs/
dist/
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ python setup.py develop
### Test

```bash
python setup.py test
python -m unittest discover -s tests -p "*.py"
```

## Maintainers
Expand Down
6 changes: 3 additions & 3 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Cython==0.29.33
Sphinx==2.2.1
sphinx-rtd-theme==0.4.3
Cython==3.0.11
Sphinx==8.1.1
sphinx-rtd-theme==3.0.1
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
long_description=long_description,
long_description_content_type="text/markdown",
license="MIT License",
test_suite="tests.test_all",
ext_modules=ext_modules,
python_requires=">=3.5, <4",
classifiers=[
Expand Down
13 changes: 0 additions & 13 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import os
import glob
import unittest
import importlib
import functools
import tempfile

Expand All @@ -17,13 +14,3 @@ def _wrapped(*args, **kwargs):
finally:
f.close()
return _wrapped

def test_all():
suite = unittest.TestSuite()
for fname in glob.glob(os.path.join(here, '*.py')):
if '__init__' in fname:
continue
module = importlib.import_module('tests.' + os.path.basename(fname).split('.py')[0])
if hasattr(module, 'suite'):
suite.addTest(module.suite())
return suite
13 changes: 7 additions & 6 deletions tests/accuracytest.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,10 @@ def _bf(self, error_rate):


def suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(StringAccuracyMmapTestCase))
suite.addTest(unittest.makeSuite(StringAccuracyMallocTestCase))
suite.addTest(unittest.makeSuite(IntegerAccuracyMmapTestCase))
suite.addTest(unittest.makeSuite(IntegerAccuracyMallocTestCase))
return suite
loader = unittest.TestLoader()
return unittest.TestSuite((
loader.loadTestsFromTestCase(StringAccuracyMmapTestCase),
loader.loadTestsFromTestCase(StringAccuracyMallocTestCase),
loader.loadTestsFromTestCase(IntegerAccuracyMmapTestCase),
loader.loadTestsFromTestCase(IntegerAccuracyMallocTestCase),
))
5 changes: 2 additions & 3 deletions tests/simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,5 @@ def test_pickle(self):
self.assertEqual(bf.bit_array, unpickled.bit_array)

def suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(SimpleTestCase))
return suite
loader = unittest.TestLoader()
return loader.loadTestsFromTestCase(SimpleTestCase)