-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated unit testing to work from many entrypoints
- Loading branch information
Showing
3 changed files
with
18 additions
and
8 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,15 @@ | ||
"""All unit tests for SciUnit""" | ||
|
||
import sys | ||
import unittest | ||
from . import * | ||
|
||
def main(): | ||
buffer = 'buffer' in sys.argv | ||
sys.argv = sys.argv[:1] # Args need to be removed for __main__ to work. | ||
unittest.main(buffer=buffer) | ||
|
||
if __name__ == '__main__': | ||
main() | ||
|
||
|
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,7 +1,7 @@ | ||
pip install coveralls | ||
git clone -b cosmosuite http://github.com/scidash/scidash ../scidash | ||
UNIT_TEST_SUITE="sciunit/unit_test/core_tests.py buffer" | ||
UNIT_TEST_SUITE="sciunit.unit_test buffer" | ||
# Fundamental Python bug prevents this latter method from allowing | ||
# some notebook tests to pass. | ||
#UNIT_TEST_SUITE="setup.py test" | ||
coverage run --source=. --omit=*unit_test*,setup.py,.eggs $UNIT_TEST_SUITE | ||
coverage run -m --source=. --omit=*unit_test*,setup.py,.eggs $UNIT_TEST_SUITE |