Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenklar committed Nov 20, 2018
1 parent 4cf4c67 commit 575984d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Expand Up @@ -2,10 +2,8 @@ language: python
cache: pip cache: pip


python: python:
- 3.4
- 3.5 - 3.5
- 3.6 - 3.6
- 3.7


addons: addons:
mariadb: '10.1' mariadb: '10.1'
Expand All @@ -20,6 +18,7 @@ before_install:
- sudo apt-get install -y libmariadbd-dev libmariadbclient-dev - sudo apt-get install -y libmariadbd-dev libmariadbclient-dev


install: install:
- pip install --upgrade pip setuptools wheel
- pip install -e . - pip install -e .
- pip install mysqlclient psycopg2-binary coveralls - pip install mysqlclient psycopg2-binary coveralls


Expand Down
11 changes: 5 additions & 6 deletions testing/runtests.py
Expand Up @@ -9,20 +9,19 @@




def main(): def main():
parser = argparse.ArgumentParser(description='Run the tests for Daiquiri.') parser = argparse.ArgumentParser()
parser.add_argument('test_label', nargs='*', help='Module paths to test; can be modulename, modulename.TestCase or modulename.TestCase.test_method') parser.add_argument('test_label', nargs='*', help='Module paths to test; can be modulename, modulename.TestCase or modulename.TestCase.test_method')

parser.add_argument('-k', '--keepdb', action='store_true', help='Preserves the test DB between runs.') parser.add_argument('-k', '--keepdb', action='store_true', help='Preserves the test DB between runs.')

parser.add_argument('-v', '--verbosity', type=int, default=1, help='Verbosity level; 0=minimal output, 1=normal output, 2=verbose output, 3=very verbose output')
args = parser.parse_args() args = parser.parse_args()


os.environ['DJANGO_SETTINGS_MODULE'] = 'config.settings' os.environ['DJANGO_SETTINGS_MODULE'] = 'config.settings'

django.setup() django.setup()

TestRunner = get_runner(settings) TestRunner = get_runner(settings)
failures = TestRunner(verbosity=1, keepdb=args.keepdb).run_tests(args.test_label) test_runner = TestRunner(verbosity=args.verbosity, keepdb=args.keepdb)
failures = test_runner.run_tests(args.test_label)
sys.exit(bool(failures)) sys.exit(bool(failures))



if __name__ == "__main__": if __name__ == "__main__":
main() main()

0 comments on commit 575984d

Please sign in to comment.