Skip to content

Commit

Permalink
Adding more instructions and slight changes regarding .travis.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
AdityaSavara committed Jul 30, 2022
1 parent 3bcd19a commit 28a6f1e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,20 @@ language: python
python:
- "3.8"
# commands to install dependencies

before_install: #this is only for UnitTesterSG.
#For UnitTesterSG, we remove the test_13.py before running the runPytestDriver.py since that python file is designed to give an error as downloaded.
- cd test13
- rm test_13.py
- cd ..

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 test_13.py before running the runPytestDriver.py since that python file is designed to give an error as downloaded.

script:
- cd test13
- rm test_13.py
- cd ..
- python3 runPytestDriver.py failWithError #The "failWithError" optional argument will cause an error exitCode if any unit tests fail.
4 changes: 4 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ There are three ways to run unit tests:

Note: For any individual test, set allowOverwrite to False when calling doTest if you want to skip UnitTesterSG from stopping to notify user when results match but result strings don't.

COMPATIBILITY WITH PYTEST AND TRAVIS CI:
Add an __init__.py file into each test directory (they can be empty) files
Then add .travis.yml to your root directory, and the script command "python3 runPytestDriver.py failWithError" within it (as in this repository).

PURPOSE OF MODULE:
UnitTesterSG is a unit testing framework that is designed for nested and/or scientific/engineering data structures. It is designed primarily for testing the outputs if a single function or simulation run by storing the expected results file such that comparisons to the stored output can be made with unit tests after the function or software has been edited. However, the compare nested objects module can also be imported directly and is quite useful even outside of unit testing.

Expand Down

0 comments on commit 28a6f1e

Please sign in to comment.