Minor Py.Test fixes

This commit is contained in:
Ivan Kravets
2022-02-19 20:45:37 +02:00
parent 33da2af31e
commit e49fb9f0d0
3 changed files with 5 additions and 3 deletions

View File

@ -11,7 +11,7 @@ format:
black ./tests
test:
py.test --verbose --capture=no --exitfirst -n 6 --dist=loadscope tests --ignore tests/test_examples.py
py.test --verbose --exitfirst -n 6 --dist=loadscope tests --ignore tests/test_examples.py
before-commit: isort format lint

View File

@ -70,7 +70,7 @@ class BasePackageManager( # pylint: disable=too-many-public-methods,too-many-in
def _setup_logger(self):
logger = logging.getLogger(str(self.__class__.__name__).replace("Package", " "))
logger.setLevel(logging.ERROR if PlatformioCLI.in_silence() else logging.INFO)
logger.setLevel(logging.INFO)
formatter = logging.Formatter("%(name)s: %(message)s")
sh = logging.StreamHandler(sys.stdout)
sh.setFormatter(formatter)

View File

@ -38,8 +38,10 @@ def validate_cliresult():
@pytest.fixture(scope="session")
def clirunner(request):
def clirunner(request, tmpdir_factory):
cache_dir = tmpdir_factory.mktemp(".cache")
backup_env_vars = {
"PLATFORMIO_CACHE_DIR": {"new": str(cache_dir)},
"PLATFORMIO_WORKSPACE_DIR": {"new": None},
}
for key, item in backup_env_vars.items():