Removed logging through ietf.utils.log.log when running tests -- should shave another 15% off the test suite run time.
- Legacy-Id: 10454
This commit is contained in:
parent
fdc7dea3df
commit
2191ec3cbd
|
@ -10,10 +10,9 @@ except ImportError: # import syslog will fail on Windows box
|
|||
|
||||
pass
|
||||
|
||||
import sys
|
||||
import inspect
|
||||
import os.path
|
||||
import ietf
|
||||
|
||||
from django.conf import settings
|
||||
|
||||
def getclass(frame):
|
||||
|
@ -31,6 +30,8 @@ def getcaller():
|
|||
return (pmodule, pclass, pfunction, pfile, pline)
|
||||
|
||||
def log(msg):
|
||||
if settings.SERVER_MODE == 'test':
|
||||
return
|
||||
if isinstance(msg, unicode):
|
||||
msg = msg.encode('unicode_escape')
|
||||
try:
|
||||
|
@ -45,4 +46,4 @@ def log(msg):
|
|||
file, line, where = "/<UNKNOWN>", 0, ""
|
||||
logger("ietf%s(%d)%s: %s" % (file, line, where, msg))
|
||||
|
||||
log("IETFdb v%s started (as %s)" % (ietf.__version__,sys.argv[0]))
|
||||
|
||||
|
|
|
@ -330,6 +330,7 @@ class IetfTestRunner(DiscoverRunner):
|
|||
ietf.utils.mail.SMTP_ADDR['port'] = 2025
|
||||
# switch to a much faster hasher
|
||||
settings.PASSWORD_HASHERS = ( 'django.contrib.auth.hashers.MD5PasswordHasher', )
|
||||
settings.SERVER_MODE = 'test'
|
||||
#
|
||||
if self.check_coverage:
|
||||
if self.coverage_file.endswith('.gz'):
|
||||
|
|
Loading…
Reference in a new issue