Skip to content

Commit b744baf

Browse files
committed
Removing incorrect test marks
1 parent 66ed19a commit b744baf

File tree

6 files changed

+4
-23
lines changed

6 files changed

+4
-23
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
repos:
22
- repo: https://github.com/ambv/black
3-
rev: master
3+
rev: 23.7.0
44
hooks:
55
- id: black
6-
args: [--line-length=100, --safe, --target-version=py38]
7-
language_version: python3.7
6+
args: [--line-length=100, --safe]
7+
language_version: python3.11
88
verbose: true
9-
exclude: ^lightbus_experiments/
9+
exclude: ^lightbus_(experiments|vendored)/

tests/client/test_validator_unit.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ def create_bus_client_with_unhappy_schema(validate=True, strict_validation=True)
5050
return create_bus_client_with_unhappy_schema
5151

5252

53-
@pytest.mark.asyncio
5453
def test_rpc_validate_incoming(create_bus_client_with_unhappy_schema):
5554
client: BusClient = create_bus_client_with_unhappy_schema()
5655

@@ -60,7 +59,6 @@ def test_rpc_validate_incoming(create_bus_client_with_unhappy_schema):
6059
jsonschema.validate.assert_called_with({"p": 1}, {"p": {}})
6160

6261

63-
@pytest.mark.asyncio
6462
def test_result_validate(create_bus_client_with_unhappy_schema):
6563
client: BusClient = create_bus_client_with_unhappy_schema()
6664

@@ -72,7 +70,6 @@ def test_result_validate(create_bus_client_with_unhappy_schema):
7270
jsonschema.validate.assert_called_with("123", {})
7371

7472

75-
@pytest.mark.asyncio
7673
def test_event_validate(create_bus_client_with_unhappy_schema):
7774
client: BusClient = create_bus_client_with_unhappy_schema()
7875

@@ -82,15 +79,13 @@ def test_event_validate(create_bus_client_with_unhappy_schema):
8279
jsonschema.validate.assert_called_with({"p": 1}, {"p": {}})
8380

8481

85-
@pytest.mark.asyncio
8682
def test_validate_disabled(create_bus_client_with_unhappy_schema):
8783
client: BusClient = create_bus_client_with_unhappy_schema(validate=False)
8884

8985
message = RpcMessage(api_name="api", procedure_name="proc", kwargs={"p": 1})
9086
validate_outgoing(config=client.config, schema=client.schema, message=message)
9187

9288

93-
@pytest.mark.asyncio
9489
def test_validate_non_strict(create_bus_client_with_unhappy_schema):
9590
client: BusClient = create_bus_client_with_unhappy_schema(strict_validation=False)
9691

@@ -101,7 +96,6 @@ def test_validate_non_strict(create_bus_client_with_unhappy_schema):
10196
validate_outgoing(config=client.config, schema=client.schema, message=message)
10297

10398

104-
@pytest.mark.asyncio
10599
def test_validate_strict_missing_api(create_bus_client_with_unhappy_schema):
106100
client: BusClient = create_bus_client_with_unhappy_schema(strict_validation=True)
107101

@@ -112,15 +106,13 @@ def test_validate_strict_missing_api(create_bus_client_with_unhappy_schema):
112106
validate_outgoing(config=client.config, schema=client.schema, message=message)
113107

114108

115-
@pytest.mark.asyncio
116109
def test_validate_incoming_disabled(create_bus_client_with_unhappy_schema):
117110
client: BusClient = create_bus_client_with_unhappy_schema(validate={"incoming": False})
118111

119112
message = RpcMessage(api_name="api", procedure_name="proc", kwargs={"p": 1})
120113
validate_incoming(config=client.config, schema=client.schema, message=message)
121114

122115

123-
@pytest.mark.asyncio
124116
def test_validate_incoming_enabled(create_bus_client_with_unhappy_schema):
125117
client: BusClient = create_bus_client_with_unhappy_schema(validate={"incoming": True})
126118

@@ -129,15 +121,13 @@ def test_validate_incoming_enabled(create_bus_client_with_unhappy_schema):
129121
validate_incoming(config=client.config, schema=client.schema, message=message)
130122

131123

132-
@pytest.mark.asyncio
133124
def test_validate_outgoing_disabled(create_bus_client_with_unhappy_schema):
134125
client: BusClient = create_bus_client_with_unhappy_schema(validate={"outgoing": False})
135126

136127
message = RpcMessage(api_name="api", procedure_name="proc", kwargs={"p": 1})
137128
validate_outgoing(config=client.config, schema=client.schema, message=message)
138129

139130

140-
@pytest.mark.asyncio
141131
def test_validate_outgoing_enabled(create_bus_client_with_unhappy_schema):
142132
client: BusClient = create_bus_client_with_unhappy_schema(validate={"outgoing": True})
143133

tests/plugins/test_unit_plugin_hooks.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ async def dummy_transport_consume_rpcs(*args, **kwargs):
8888
assert hook_tracker() == ["before_rpc_execution", "after_rpc_execution"]
8989

9090

91-
@pytest.mark.asyncio
9291
def test_event_sent(track_called_hooks, dummy_bus: BusPath, loop, add_base_plugin, dummy_api):
9392
add_base_plugin()
9493
dummy_bus.client.register_api(dummy_api)

tests/tests_testing.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from lightbus.utilities.testing import QueueMockContext
77

88

9-
@pytest.mark.asyncio
109
def test_queue_mock_context_sync():
1110
queue = InternalQueue()
1211

tests/transports/redis/benchmark_integration_redis.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ def bus(redis_config_file):
4848

4949

5050
@pytest.mark.benchmark(group="network")
51-
@pytest.mark.asyncio
5251
def benchmark_call_rpc(run_lightbus, bus, benchmark):
5352
def benchmark_me():
5453
assert bus.benchmark.call_me()
@@ -57,7 +56,6 @@ def benchmark_me():
5756

5857

5958
@pytest.mark.benchmark(group="network")
60-
@pytest.mark.asyncio
6159
def benchmark_fire_event(bus, benchmark):
6260
bus.client.register_api(BenchmarkApi())
6361
benchmark.pedantic(bus.benchmark.fire_me.fire, rounds=20, warmup_rounds=1)

tests/transports/test_pool.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ def run_in_many_threads_(async_fn, max_workers=50, executions=200, *args, **kwar
8888
return run_in_many_threads_
8989

9090

91-
@pytest.mark.asyncio
9291
def test_equal(dummy_pool):
9392
"""Test the __eq__ method"""
9493
assert dummy_pool == TransportPool(
@@ -98,7 +97,6 @@ def test_equal(dummy_pool):
9897
)
9998

10099

101-
@pytest.mark.asyncio
102100
def test_not_equal(redis_pool, redis_server_url):
103101
"""Test the __eq__ method"""
104102
assert redis_pool != TransportPool(
@@ -108,7 +106,6 @@ def test_not_equal(redis_pool, redis_server_url):
108106
)
109107

110108

111-
@pytest.mark.asyncio
112109
def test_hash_equal(dummy_pool):
113110
"""Test the __hash__ method"""
114111
assert hash(dummy_pool) == hash(
@@ -120,7 +117,6 @@ def test_hash_equal(dummy_pool):
120117
)
121118

122119

123-
@pytest.mark.asyncio
124120
def test_hash_not_equal(redis_pool, redis_server_url):
125121
"""Test the __hash__ method"""
126122
assert hash(redis_pool) != hash(
@@ -146,7 +142,6 @@ async def test_grow(dummy_pool: TransportPool):
146142
assert dummy_pool.in_use == 0
147143

148144

149-
@pytest.mark.asyncio
150145
def test_grow_threaded(redis_pool: TransportPool, run_in_many_threads):
151146
run_in_many_threads(redis_pool.grow, executions=200)
152147

0 commit comments

Comments
 (0)