Skip to content

Commit c48b99e

Browse files
committedDec 2, 2021
Fix string quote style
1 parent 54f4626 commit c48b99e

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed
 

‎pytest_django/asserts.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
TYPE_CHECKING = False
1313

1414

15-
test_case = TestCase('run')
15+
test_case = TestCase("run")
1616

1717

1818
def _wrapper(name: str):
@@ -28,10 +28,10 @@ def assertion_func(*args, **kwargs):
2828
__all__ = []
2929
assertions_names = set() # type: Set[str]
3030
assertions_names.update(
31-
{attr for attr in vars(TestCase) if attr.startswith('assert')},
32-
{attr for attr in vars(SimpleTestCase) if attr.startswith('assert')},
33-
{attr for attr in vars(LiveServerTestCase) if attr.startswith('assert')},
34-
{attr for attr in vars(TransactionTestCase) if attr.startswith('assert')},
31+
{attr for attr in vars(TestCase) if attr.startswith("assert")},
32+
{attr for attr in vars(SimpleTestCase) if attr.startswith("assert")},
33+
{attr for attr in vars(LiveServerTestCase) if attr.startswith("assert")},
34+
{attr for attr in vars(TransactionTestCase) if attr.startswith("assert")},
3535
)
3636

3737
for assert_func in assertions_names:

‎pytest_django/live_server_helper.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def __init__(self, addr: str) -> None:
1919
for conn in connections.all():
2020
# If using in-memory sqlite databases, pass the connections to
2121
# the server thread.
22-
if conn.vendor == 'sqlite' and conn.is_in_memory_db():
22+
if conn.vendor == "sqlite" and conn.is_in_memory_db():
2323
# Explicitly enable thread-shareability for this connection.
2424
conn.inc_thread_sharing()
2525
connections_override[conn.alias] = conn

‎pytest_django/plugin.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ def get_order_number(test: pytest.Item) -> int:
382382
uses_db = True
383383
transactional = not issubclass(test_cls, TestCase)
384384
else:
385-
marker_db = test.get_closest_marker('django_db')
385+
marker_db = test.get_closest_marker("django_db")
386386
if marker_db:
387387
(
388388
transaction,
@@ -395,7 +395,7 @@ def get_order_number(test: pytest.Item) -> int:
395395
else:
396396
uses_db = False
397397
transactional = False
398-
fixtures = getattr(test, 'fixturenames', [])
398+
fixtures = getattr(test, "fixturenames", [])
399399
transactional = transactional or "transactional_db" in fixtures
400400
uses_db = uses_db or "db" in fixtures
401401

0 commit comments

Comments
 (0)
Please sign in to comment.