-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a module script to run h5py tests with a patched dataset class.
Since additional dependencies are required by h5py tests, a package extra has been added to require them.
- Loading branch information
Showing
3 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
"""Run h5py unit tests with patched dataset class. | ||
This module does not provide test cases, but it calls the h5py tests directly. | ||
You may run it with ``python -m b2h5py.tests.test_patched_h5py``. | ||
This module has additional dependencies. You may want to install this | ||
package's ``h5py-test`` extra. | ||
""" | ||
|
||
import os | ||
import unittest | ||
|
||
import b2h5py | ||
import h5py | ||
import h5py.tests | ||
|
||
|
||
def run_h5py_tests(): | ||
"""Run h5py unit tests with patched dataset class""" | ||
test_suite = unittest.defaultTestLoader.discover( | ||
os.path.dirname(h5py.tests.__file__), | ||
top_level_dir=os.path.dirname(os.path.dirname(h5py.__file__))) | ||
test_runner = unittest.TextTestRunner() | ||
test_runner.run(test_suite) | ||
|
||
|
||
if __name__ == '__main__': | ||
run_h5py_tests() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters