Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #20 from andymckay/master

skip resets
  • Loading branch information...
commit ce5136a257cd44a1c663319124a255c1d10a9834 2 parents 3c2214d + 139131c
@jbalogh authored
Showing with 7 additions and 6 deletions.
  1. +7 −6 test_utils/runner.py
View
13 test_utils/runner.py
@@ -121,12 +121,13 @@ def sql_reset_sequences(connection):
print ('Reusing old database "%s". Set env var FORCE_DB=1 if '
'you need fresh DBs.' % test_db_name)
- # Reset auto-increment sequences. Apparently, SUMO's tests are
- # horrid and coupled to certain numbers.
- cursor = connection.cursor()
- for statement in sql_reset_sequences(connection):
- cursor.execute(statement)
- connection.commit_unless_managed() # which it is
+ if getattr(settings, 'SQL_RESET_SEQUENCES', True):
+ # Reset auto-increment sequences. Apparently, SUMO's tests
+ # are horrid and coupled to certain numbers.
+ cursor = connection.cursor()
+ for statement in sql_reset_sequences(connection):
+ cursor.execute(statement)
+ connection.commit_unless_managed() # which it is
creation.__class__ = SkipDatabaseCreation
else:
Please sign in to comment.
Something went wrong with that request. Please try again.