From e03bc94af2d0aee7054adc8948b0ed03978d87c4 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Wed, 1 Nov 2023 17:12:44 -0400 Subject: [PATCH] chore: config (#664) * chore: add a couple of pytest options Signed-off-by: Henry Schreiner * chore: tracemalloc for nox Signed-off-by: Henry Schreiner * tests: remove passing xfail Signed-off-by: Henry Schreiner --------- Signed-off-by: Henry Schreiner --- noxfile.py | 2 +- pyproject.toml | 2 ++ tests/test_local.py | 4 ---- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/noxfile.py b/noxfile.py index e83d0409..9fa05b4e 100644 --- a/noxfile.py +++ b/noxfile.py @@ -32,7 +32,7 @@ def tests(session): Run the unit and regular tests. """ session.install("-e", ".[dev]") - session.run("pytest", *session.posargs) + session.run("pytest", *session.posargs, env={"PYTHONTRACEMALLOC": "5"}) @nox.session(reuse_venv=True) diff --git a/pyproject.toml b/pyproject.toml index 07ebdc18..f3edc570 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -104,6 +104,7 @@ ignore_missing_imports = true [tool.pytest.ini_options] +testpaths = ["tests"] minversion = "6.0" addopts = ["-ra", "--showlocals", "--cov-config=setup.cfg", "--strict-markers", "--strict-config"] norecursedirs = ["examples", "experiments"] @@ -111,6 +112,7 @@ filterwarnings = [ "always" ] log_cli_level = "info" +xfail_strict = true required_plugins = ["pytest-timeout", "pytest-mock"] timeout = 300 optional_tests = """ diff --git a/tests/test_local.py b/tests/test_local.py index 3b5eb514..63583b41 100644 --- a/tests/test_local.py +++ b/tests/test_local.py @@ -1052,10 +1052,6 @@ class TestLocalEncoding: except NameError: richstr = chr(40960) - @pytest.mark.xfail( - IS_WIN32, - reason="Unicode output on Windows does not work (Python 3.6+ was supposed to work)", - ) def test_inout_rich(self): from plumbum.cmd import echo