Skip to content

Commit

Permalink
unittests now exit 1 when a test fails
Browse files Browse the repository at this point in the history
  • Loading branch information
len0rd committed Jan 16, 2019
1 parent 81e819c commit 38d6788
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ language: python
sudo: required
dist: xenial
services: postgresql
before_script:
before_script: # setup postgres db
- psql -f server/setup/internal/setup_database.sql -U postgres
python:
- "3.5"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Imaging
# Imaging [![Build Status](https://travis-ci.com/BYU-AUVSI/imaging.png)](https://travis-ci.com/BYU-AUVSI/imaging)

This package contains all the code used by the imaging subsystem.

Expand Down
10 changes: 7 additions & 3 deletions server/src/test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#!/usr/bin/env python
import unittest
import unittest, sys

if __name__ == "__main__":
def main():
suite = unittest.TestLoader().discover('.', pattern = "*_test.py")
unittest.TextTestRunner(verbosity=2).run(suite)
results = unittest.TextTestRunner(verbosity=2).run(suite)
sys.exit(not results.wasSuccessful())

if __name__ == "__main__":
main()

0 comments on commit 38d6788

Please sign in to comment.