Permalink
Browse files

Merge pull request #20 from andymckay/master

skip resets
  • Loading branch information...
2 parents 3c2214d + 139131c commit ce5136a257cd44a1c663319124a255c1d10a9834 @jbalogh committed Nov 20, 2012
Showing with 7 additions and 6 deletions.
  1. +7 −6 test_utils/runner.py
View
@@ -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:

0 comments on commit ce5136a

Please sign in to comment.