Skip to content

Commit 30890ee

Browse files
committed
tests/lint: PT001
1 parent e222ac2 commit 30890ee

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def pytest_assertrepr_compare(
6161
return None
6262

6363

64-
@pytest.fixture()
64+
@pytest.fixture
6565
def randbytes() -> Callable[[int], bytes]:
6666
def function(length: int) -> bytes:
6767
return bytes(

tests/test_assertion_rewriting.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
@pytest.mark.xfail(reason="Test assertion rewriting")
99
class TestMemoryviewAssertion:
10-
@pytest.fixture()
10+
@pytest.fixture
1111
def value(self) -> bytes:
1212
return bytes(_ % 256 for _ in range(10000))
1313

tests/test_md.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def algorithm_str(self, request: Any) -> str:
6060
assert isinstance(request.param, str)
6161
return request.param
6262

63-
@pytest.fixture()
63+
@pytest.fixture
6464
def algorithm(self, algorithm_str: str) -> hashlib.Algorithm:
6565
return cast(hashlib.Algorithm, getattr(hashlib, algorithm_str))
6666

@@ -153,7 +153,7 @@ def algorithm_str(self, request: Any) -> str:
153153
assert isinstance(request.param, str)
154154
return request.param
155155

156-
@pytest.fixture()
156+
@pytest.fixture
157157
def algorithm(self, algorithm_str: str) -> hmac.Algorithm:
158158
return cast(hmac.Algorithm, getattr(hmac, algorithm_str))
159159

tests/test_pk.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class TestECPoint:
8888
def xyz(self, request: Any) -> Tuple[int, int, int]:
8989
return request.param # type: ignore[no-any-return]
9090

91-
@pytest.fixture()
91+
@pytest.fixture
9292
def point(self, xyz: Tuple[int, int, int]) -> ECPoint:
9393
return ECPoint(*xyz)
9494

tests/test_ringbuf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from mbedtls._ringbuf import RingBuffer # type: ignore
1212

1313

14-
@pytest.fixture()
14+
@pytest.fixture
1515
def randomize_start(
1616
randbytes: Callable[[int], bytes]
1717
) -> Callable[[bytes], None]:

tests/test_tls.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -193,11 +193,11 @@ def test_unpicklable(self, obj: object) -> None:
193193

194194

195195
class TestPSKStoreProxy:
196-
@pytest.fixture()
196+
@pytest.fixture
197197
def psk_store(self) -> Mapping[str, bytes]:
198198
return {"client": b"the secret key"}
199199

200-
@pytest.fixture()
200+
@pytest.fixture
201201
def proxy(self, psk_store: Mapping[str, bytes]) -> PSKStoreProxy:
202202
return PSKStoreProxy(psk_store)
203203

@@ -245,11 +245,11 @@ def version(self, request: Any) -> TLSVersion:
245245
assert isinstance(request.param, TLSVersion)
246246
return request.param
247247

248-
@pytest.fixture()
248+
@pytest.fixture
249249
def length(self) -> int:
250250
return 42
251251

252-
@pytest.fixture()
252+
@pytest.fixture
253253
def header(
254254
self,
255255
record_type: TLSRecordHeader.RecordType,
@@ -289,7 +289,7 @@ def test_serialization(self, header: TLSRecordHeader) -> None:
289289

290290

291291
class TestTLSSession:
292-
@pytest.fixture()
292+
@pytest.fixture
293293
def session(self) -> TLSSession:
294294
return TLSSession()
295295

@@ -298,7 +298,7 @@ def test_repr(self, session: TLSSession) -> None:
298298

299299

300300
class TestTrustStore:
301-
@pytest.fixture()
301+
@pytest.fixture
302302
def store(self) -> TrustStore:
303303
return TrustStore.system()
304304

@@ -340,7 +340,7 @@ def test_add_new_certificate(self, store: TrustStore) -> None:
340340

341341

342342
class TestDTLSCookie:
343-
@pytest.fixture()
343+
@pytest.fixture
344344
def cookie(self) -> DTLSCookie:
345345
return DTLSCookie()
346346

@@ -463,7 +463,7 @@ def test_psk_store(
463463

464464

465465
class TestTLSConfiguration:
466-
@pytest.fixture()
466+
@pytest.fixture
467467
def conf(self) -> TLSConfiguration:
468468
return TLSConfiguration()
469469

@@ -485,7 +485,7 @@ def test_highest_supported_version(
485485

486486

487487
class TestDTLSConfiguration:
488-
@pytest.fixture()
488+
@pytest.fixture
489489
def conf(self) -> DTLSConfiguration:
490490
return DTLSConfiguration()
491491

0 commit comments

Comments
 (0)