Forcibly delete ELASTICSEARCH_URL from environment to skip those tests unless --elasticsearch specified

pull/2558/head
Matt Westcott 2016-05-03 17:19:29 +01:00
rodzic eede616086
commit 58f747b955
1 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -49,6 +49,9 @@ def runtests():
if args.elasticsearch:
os.environ.setdefault('ELASTICSEARCH_URL', 'http://localhost:9200')
elif 'ELASTICSEARCH_URL' in os.environ:
# forcibly delete the ELASTICSEARCH_URL setting to skip those tests
del os.environ['ELASTICSEARCH_URL']
argv = [sys.argv[0], 'test'] + args.rest
try: