Skip to content
Permalink
Browse files

Fix tests

  • Loading branch information...
jochenklar committed Nov 6, 2018
1 parent 4cf4c67 commit 575984d2094fcaf0ae66e1f454541017114242d3
Showing with 6 additions and 8 deletions.
  1. +1 −2 .travis.yml
  2. +5 −6 testing/runtests.py
@@ -2,10 +2,8 @@ language: python
cache: pip

python:
- 3.4
- 3.5
- 3.6
- 3.7

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

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

@@ -9,20 +9,19 @@


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('-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()

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

django.setup()

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))


if __name__ == "__main__":
main()

0 comments on commit 575984d

Please sign in to comment.
You can’t perform that action at this time.