-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #291 from AdityaSavara/develop
Develop
- Loading branch information
Showing
4 changed files
with
48 additions
and
2 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,29 @@ | ||
language: python | ||
python: | ||
- "3.8" | ||
# commands to install dependencies | ||
install: | ||
#No installation is required for UnitTesterSG with what is already on the Travis CI, so commenting out the below to let the build test run faster. | ||
#- virtualenv -p /opt/pyenv/versions/3.8/bin/python3.8 venv | ||
#- source venv/bin/activate | ||
#- pip install UnitTesterSG[COMPLETE] #this is mostly to get the dependencies. | ||
#- python setup.py install #now overwrite old installations with the current version. | ||
# command to run tests | ||
#remove the Examples13 doe test_3 and test_4.py since they require MPI and we have not gotten that to work on travis CI. | ||
- cd Examples/Example13doeFunctionExample/ | ||
- rm test_3.py | ||
- rm test_4.py | ||
- cd .. | ||
- cd .. | ||
- pip install UnitTesterSG | ||
- pip install numpy | ||
- pip install pandas | ||
- pip install matplotlib | ||
- pip install scipy | ||
- pip install CiteSoft | ||
- pip install zeus-mcmc | ||
- pip install dill | ||
- pip install emcee | ||
script: | ||
- cd Examples | ||
- python3 runPytestDriver.py failWithError #The "failWithError" optional argument will cause an error exitCode if any unit tests fail. |
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,14 @@ | ||
import UnitTesterSG | ||
|
||
UnitTesterSG.pytestDriver() | ||
import sys | ||
|
||
#We want runPytestDriver.py to give a pytest exitCode of 1 for travis CI purposes. That means we need to create an "actual" error when any test fails. | ||
#The pytestDriver function of UnitTesterSG has an option to 'crash' with an error if "failWithError" is passed in. | ||
#So the below lines of code are such that if the command line has 'python runPytestDriver.py failWithError" | ||
if (len(sys.argv) <= 1): | ||
UnitTesterSG.pytestDriver(failWithError=False) | ||
elif sys.argv[1].strip() == '': | ||
UnitTesterSG.pytestDriver(failWithError=False) | ||
elif sys.argv[1].strip().lower() == 'failwitherror': | ||
sys.argv.pop(1) #Need to remove the argument from sys.argv, because pytest also looks in the system arguments and if "failWithError" is still present, that will cause an undesired error. | ||
UnitTesterSG.pytestDriver(failWithError=True) |
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