diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dfcd488..c5723ab 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/psf/black-pre-commit-mirror - rev: 25.9.0 + rev: 26.1.0 hooks: - id: black args: [--safe, --quiet] diff --git a/tests/test_base_url.py b/tests/test_base_url.py index 96de0e9..8bcddd9 100644 --- a/tests/test_base_url.py +++ b/tests/test_base_url.py @@ -4,27 +4,23 @@ def test_fixture(testdir): - testdir.makepyfile( - """ + testdir.makepyfile(""" import pytest @pytest.fixture(scope='session') def base_url(): return 'foo' def test_fixture(base_url): assert base_url == 'foo' - """ - ) + """) result = testdir.runpytest() assert result.ret == 0 def test_cli(testdir): - testdir.makepyfile( - """ + testdir.makepyfile(""" def test_funcarg(base_url): assert base_url == 'foo' - """ - ) + """) result = testdir.runpytest("--base-url", "foo") assert result.ret == 0 @@ -37,14 +33,12 @@ def test_config(testdir): base_url=foo """, ) - testdir.makepyfile( - """ + testdir.makepyfile(""" def test_config(request, base_url): assert request.config.getvalue('base_url') == 'foo' assert request.config.getini('base_url') == 'foo' assert base_url == 'foo' - """ - ) + """) result = testdir.runpytest() assert result.ret == 0 @@ -57,27 +51,23 @@ def test_skip_config(testdir): base_url=foo """, ) - testdir.makepyfile( - """ + testdir.makepyfile(""" import pytest @pytest.mark.skipif( "config.getoption('base_url') == 'foo'", reason='skip') def test_skip_config(): pass - """ - ) + """) result = testdir.runpytest() assert result.ret == 0 def test_env_var_set(testdir, monkeypatch): - testdir.makepyfile( - """ + testdir.makepyfile(""" def test_config(request, base_url): assert request.config.getvalue('base_url') assert base_url == 'yeehaw' - """ - ) + """) monkeypatch.setenv("PYTEST_BASE_URL", "yeehaw") reprec = testdir.inline_run() passed, skipped, failed = reprec.listoutcomes() @@ -85,12 +75,10 @@ def test_config(request, base_url): def test_metadata(testdir, monkeypatch): - testdir.makepyfile( - """ + testdir.makepyfile(""" def test_config(metadata): assert metadata["Base URL"] == 'yeehaw' - """ - ) + """) monkeypatch.setenv("PYTEST_BASE_URL", "yeehaw") reprec = testdir.inline_run() passed, skipped, failed = reprec.listoutcomes()