Actually pass the tests again with removed remove_last_newline.

This commit is contained in:
Dave Halter
2017-06-01 18:26:40 +02:00
parent 814b16cc6c
commit b1b165c21e
6 changed files with 59 additions and 15 deletions

View File

@@ -1,5 +1,7 @@
import tempfile
import shutil
import logging
import sys
import pytest
@@ -25,3 +27,21 @@ def clean_parso_cache():
yield
cache._default_cache_path = old
shutil.rmtree(tmp)
def pytest_addoption(parser):
parser.addoption("--logging", "-L", action='store_true',
help="Enables the logging output.")
def pytest_configure(config):
if config.option.logging:
root = logging.getLogger()
root.setLevel(logging.DEBUG)
ch = logging.StreamHandler(sys.stdout)
ch.setLevel(logging.DEBUG)
#formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
#ch.setFormatter(formatter)
root.addHandler(ch)