-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
89 additions
and
64 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
neatest |
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 |
---|---|---|
@@ -1,29 +1,35 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import unittest | ||
from pathlib import Path | ||
|
||
|
||
def suite(): | ||
"""Can be imported into `setup.py` as `test_suite="test_unit.suite"`.""" | ||
|
||
parent_dir = Path(__file__).parent | ||
init_py, = parent_dir.glob("*/__init__.py") | ||
|
||
return unittest.TestLoader().discover( | ||
top_level_dir=str(parent_dir), | ||
start_dir=str(init_py.parent), | ||
pattern="*.py") | ||
|
||
|
||
def run_tests(): | ||
"""Discovers and runs unit tests for the module.""" | ||
|
||
result = unittest.TextTestRunner(buffer=True).run(suite()) | ||
|
||
if result.failures or result.errors: | ||
exit(1) | ||
|
||
import neatest | ||
|
||
if __name__ == "__main__": | ||
run_tests() | ||
neatest.run() | ||
|
||
# | ||
# import unittest | ||
# from pathlib import Path | ||
# | ||
# | ||
# def suite(): | ||
# """Can be imported into `setup.py` as `test_suite="test_unit.suite"`.""" | ||
# | ||
# parent_dir = Path(__file__).parent | ||
# init_py, = parent_dir.glob("*/__init__.py") | ||
# | ||
# return unittest.TestLoader().discover( | ||
# top_level_dir=str(parent_dir), | ||
# start_dir=str(init_py.parent), | ||
# pattern="*.py") | ||
# | ||
# | ||
# def run_tests(): | ||
# """Discovers and runs unit tests for the module.""" | ||
|
||
# result = unittest.TextTestRunner(buffer=True).run(suite()) | ||
# | ||
# if result.failures or result.errors: | ||
# exit(1) | ||
# | ||
# | ||
# if __name__ == "__main__": | ||
# run_tests() |
Empty file.
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
__version__ = "0.3.5" | ||
__version__ = "0.3.6" | ||
__copyright__ = "(c) 2020-2021 Artëm IG <github.com/rtmigo>" | ||
__license__ = "BSD-3-Clause" |
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