Skip to content

Commit 9f36aeb

Browse files
committed
Fix PT001 pytest-fixture-incorrect-parentheses-style
1 parent 00d6de6 commit 9f36aeb

File tree

58 files changed

+106
-106
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+106
-106
lines changed

tests/agent_features/test_configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
SKIP_IF_NOT_PY311 = pytest.mark.skipif(sys.version_info < (3, 11), reason="TOML not in the standard library.")
4848

4949

50-
@pytest.fixture()
50+
@pytest.fixture
5151
def collector_available_fixture():
5252
# Disable fixture that requires real application to exist for this file
5353
pass

tests/agent_features/test_metric_normalization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def core_app(collector_agent_registration):
4040
return app._agent.application(app.name)
4141

4242

43-
@pytest.fixture()
43+
@pytest.fixture
4444
def rules_engine_fixture(core_app):
4545
rules_engine = core_app._rules_engine
4646
previous_rules = rules_engine["metric"]

tests/agent_features/test_serverless_mode.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
from newrelic.core.config import global_settings
2929

3030

31-
@pytest.fixture()
31+
@pytest.fixture
3232
def serverless_application(request):
3333
settings = global_settings()
3434
orig = settings.serverless_mode.enabled

tests/agent_features/test_web_transaction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def test_base_web_transaction(use_bytes):
142142
transaction.process_response(200, response_headers)
143143

144144

145-
@pytest.fixture()
145+
@pytest.fixture
146146
def validate_no_garbage():
147147
yield
148148

tests/agent_streaming/conftest.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def wait(self, *args, **kwargs):
6868
return super(SetEventOnWait, self).wait(*args, **kwargs)
6969

7070

71-
@pytest.fixture()
71+
@pytest.fixture
7272
def buffer_empty_event(monkeypatch):
7373
event = threading.Event()
7474

@@ -85,23 +85,23 @@ def batching(request):
8585
return request.param
8686

8787

88-
@pytest.fixture()
88+
@pytest.fixture
8989
def spans_received():
9090
from _test_handler import SPANS_RECEIVED
9191

9292
SPANS_RECEIVED.clear()
9393
return SPANS_RECEIVED
9494

9595

96-
@pytest.fixture()
96+
@pytest.fixture
9797
def span_batches_received():
9898
from _test_handler import SPAN_BATCHES_RECEIVED
9999

100100
SPAN_BATCHES_RECEIVED.clear()
101101
return SPAN_BATCHES_RECEIVED
102102

103103

104-
@pytest.fixture()
104+
@pytest.fixture
105105
def spans_processed_event():
106106
from _test_handler import SPANS_PROCESSED_EVENT
107107

tests/agent_streaming/test_infinite_tracing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
CONDITION_CLS = type(threading.Condition())
3232

3333

34-
@pytest.fixture()
34+
@pytest.fixture
3535
def app():
3636
app = Application("Python Agent Test (Infinite Tracing)")
3737
yield app

tests/agent_streaming/test_stream_buffer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def stop_iteration_condition(*args, **kwargs):
2929
return StopIterationOnWait(*args, **kwargs)
3030

3131

32-
@pytest.fixture()
32+
@pytest.fixture
3333
def stop_iteration_on_wait(monkeypatch):
3434
monkeypatch.setattr(StreamBuffer, "condition", stop_iteration_condition)
3535

tests/agent_unittests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class FakeProtos:
4444
sys.modules["newrelic.core.infinite_tracing_pb2"] = FakeProtos
4545

4646

47-
@pytest.fixture()
47+
@pytest.fixture
4848
def global_settings(request, monkeypatch):
4949
ini_contents = request.getfixturevalue("ini")
5050

tests/agent_unittests/test_trace_cache.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class DummyTrace:
2525
pass
2626

2727

28-
@pytest.fixture()
28+
@pytest.fixture
2929
def trace_cache():
3030
return TraceCache()
3131

@@ -54,7 +54,7 @@ def test_trace_cache_methods(trace_cache):
5454
assert len(list(trace_cache.values())) == 1
5555

5656

57-
@pytest.fixture()
57+
@pytest.fixture
5858
def iterate_trace_cache(trace_cache):
5959
def _iterate_trace_cache(shutdown):
6060
while True:
@@ -70,7 +70,7 @@ def _iterate_trace_cache(shutdown):
7070
return _iterate_trace_cache
7171

7272

73-
@pytest.fixture()
73+
@pytest.fixture
7474
def change_weakref_dict_size(trace_cache):
7575
def _change_weakref_dict_size(shutdown, obj_refs):
7676
"""

tests/agent_unittests/test_wrappers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from newrelic.common.object_wrapper import function_wrapper
1818

1919

20-
@pytest.fixture()
20+
@pytest.fixture
2121
def wrapper():
2222
@function_wrapper
2323
def _wrapper(wrapped, instance, args, kwargs):
@@ -26,7 +26,7 @@ def _wrapper(wrapped, instance, args, kwargs):
2626
return _wrapper
2727

2828

29-
@pytest.fixture()
29+
@pytest.fixture
3030
def wrapped_function(wrapper):
3131
@wrapper
3232
def wrapped():

0 commit comments

Comments
 (0)