Skip to content

Commit

Permalink
Add test-runner option to run zpop* tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
coleifer committed Oct 1, 2018
1 parent 055c838 commit 6281da3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions runtests.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
#!/usr/bin/env python

import optparse
import os
import sys
import unittest

from walrus import tests

def runtests(verbose=False, failfast=False, names=None):
if names:
suite = unittest.TestLoader().loadTestsFromNames(names, tests)
Expand All @@ -31,7 +30,14 @@ def runtests(verbose=False, failfast=False, names=None):
dest='verbose', help='Verbose output.')
parser.add_option('-f', '--failfast', action='store_true', default=False,
help='Stop on first failure or error.')
parser.add_option('-z', '--zpop', action='store_true',
help='Run ZPOP* tests.')
options, args = parser.parse_args()
if options.zpop:
os.environ['TEST_ZPOP'] = '1'

from walrus import tests

result = runtests(
verbose=options.verbose,
failfast=options.failfast,
Expand Down

0 comments on commit 6281da3

Please sign in to comment.