Skip to content

Commit 9bfa0d3

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 1c857ca commit 9bfa0d3

File tree

2 files changed

+12
-30
lines changed

2 files changed

+12
-30
lines changed

tests/test_quoting_benchmarks.py

+11-30
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
try:
66
from pytest_codspeed import BenchmarkFixture
7+
78
CODSPEED_MISSING = False
89
except ImportError:
910
CODSPEED_MISSING = True
@@ -21,99 +22,79 @@
2122
LONG_QUERY_WITH_PCT = LONG_QUERY + "&d=%25%2F%3F%3A%40%26%3B%3D%2B"
2223

2324

24-
@pytest.mark.skipif(
25-
CODSPEED_MISSING, reason="pytest-codspeed needs to be installed"
26-
)
25+
@pytest.mark.skipif(CODSPEED_MISSING, reason="pytest-codspeed needs to be installed")
2726
def test_quote_query_string(benchmark: BenchmarkFixture) -> None:
2827
@benchmark
2928
def _run() -> None:
3029
for _ in range(100):
3130
QUERY_QUOTER("a=1&b=2&c=3&d=4&e=5&f=6&g=7&h=8&i=9&j=0")
3231

3332

34-
@pytest.mark.skipif(
35-
CODSPEED_MISSING, reason="pytest-codspeed needs to be installed"
36-
)
33+
@pytest.mark.skipif(CODSPEED_MISSING, reason="pytest-codspeed needs to be installed")
3734
def test_quoter_ascii(benchmark: BenchmarkFixture) -> None:
3835
@benchmark
3936
def _run() -> None:
4037
for _ in range(100):
4138
QUOTER_SLASH_SAFE("/path/to")
4239

4340

44-
@pytest.mark.skipif(
45-
CODSPEED_MISSING, reason="pytest-codspeed needs to be installed"
46-
)
41+
@pytest.mark.skipif(CODSPEED_MISSING, reason="pytest-codspeed needs to be installed")
4742
def test_quote_long_path(benchmark: BenchmarkFixture) -> None:
4843
@benchmark
4944
def _run() -> None:
5045
for _ in range(100):
5146
PATH_QUOTER(LONG_PATH)
5247

5348

54-
@pytest.mark.skipif(
55-
CODSPEED_MISSING, reason="pytest-codspeed needs to be installed"
56-
)
49+
@pytest.mark.skipif(CODSPEED_MISSING, reason="pytest-codspeed needs to be installed")
5750
def test_quoter_pct(benchmark: BenchmarkFixture) -> None:
5851
@benchmark
5952
def _run() -> None:
6053
for _ in range(100):
6154
QUOTER("abc%0a")
6255

6356

64-
@pytest.mark.skipif(
65-
CODSPEED_MISSING, reason="pytest-codspeed needs to be installed"
66-
)
57+
@pytest.mark.skipif(CODSPEED_MISSING, reason="pytest-codspeed needs to be installed")
6758
def test_long_query(benchmark: BenchmarkFixture) -> None:
6859
@benchmark
6960
def _run() -> None:
7061
for _ in range(100):
7162
QUERY_QUOTER(LONG_QUERY)
7263

7364

74-
@pytest.mark.skipif(
75-
CODSPEED_MISSING, reason="pytest-codspeed needs to be installed"
76-
)
65+
@pytest.mark.skipif(CODSPEED_MISSING, reason="pytest-codspeed needs to be installed")
7766
def test_long_query_with_pct(benchmark: BenchmarkFixture) -> None:
7867
@benchmark
7968
def _run() -> None:
8069
for _ in range(100):
8170
QUERY_QUOTER(LONG_QUERY_WITH_PCT)
8271

8372

84-
@pytest.mark.skipif(
85-
CODSPEED_MISSING, reason="pytest-codspeed needs to be installed"
86-
)
73+
@pytest.mark.skipif(CODSPEED_MISSING, reason="pytest-codspeed needs to be installed")
8774
def test_quoter_quote_utf8(benchmark: BenchmarkFixture) -> None:
8875
@benchmark
8976
def _run() -> None:
9077
for _ in range(100):
9178
PATH_QUOTER("/шлях/файл")
9279

9380

94-
@pytest.mark.skipif(
95-
CODSPEED_MISSING, reason="pytest-codspeed needs to be installed"
96-
)
81+
@pytest.mark.skipif(CODSPEED_MISSING, reason="pytest-codspeed needs to be installed")
9782
def test_unquoter_short(benchmark: BenchmarkFixture) -> None:
9883
@benchmark
9984
def _run() -> None:
10085
for _ in range(100):
10186
UNQUOTER("/path/to")
10287

10388

104-
@pytest.mark.skipif(
105-
CODSPEED_MISSING, reason="pytest-codspeed needs to be installed"
106-
)
89+
@pytest.mark.skipif(CODSPEED_MISSING, reason="pytest-codspeed needs to be installed")
10790
def test_unquoter_long_ascii(benchmark: BenchmarkFixture) -> None:
10891
@benchmark
10992
def _run() -> None:
11093
for _ in range(100):
11194
UNQUOTER(LONG_QUERY)
11295

11396

114-
@pytest.mark.skipif(
115-
CODSPEED_MISSING, reason="pytest-codspeed needs to be installed"
116-
)
97+
@pytest.mark.skipif(CODSPEED_MISSING, reason="pytest-codspeed needs to be installed")
11798
def test_unquoter_long_pct(benchmark: BenchmarkFixture) -> None:
11899
@benchmark
119100
def _run() -> None:

tests/test_url_benchmarks.py

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
try:
66
from pytest_codspeed import BenchmarkFixture
7+
78
CODSPEED_MISSING = False
89
except ImportError:
910
CODSPEED_MISSING = True

0 commit comments

Comments
 (0)