Skip to content

Commit

Permalink
Fix string quote style
Browse files Browse the repository at this point in the history
  • Loading branch information
bluetech committed Dec 2, 2021
1 parent 54f4626 commit c48b99e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions pytest_django/asserts.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
TYPE_CHECKING = False


test_case = TestCase('run')
test_case = TestCase("run")


def _wrapper(name: str):
Expand All @@ -28,10 +28,10 @@ def assertion_func(*args, **kwargs):
__all__ = []
assertions_names = set() # type: Set[str]
assertions_names.update(
{attr for attr in vars(TestCase) if attr.startswith('assert')},
{attr for attr in vars(SimpleTestCase) if attr.startswith('assert')},
{attr for attr in vars(LiveServerTestCase) if attr.startswith('assert')},
{attr for attr in vars(TransactionTestCase) if attr.startswith('assert')},
{attr for attr in vars(TestCase) if attr.startswith("assert")},
{attr for attr in vars(SimpleTestCase) if attr.startswith("assert")},
{attr for attr in vars(LiveServerTestCase) if attr.startswith("assert")},
{attr for attr in vars(TransactionTestCase) if attr.startswith("assert")},
)

for assert_func in assertions_names:
Expand Down
2 changes: 1 addition & 1 deletion pytest_django/live_server_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def __init__(self, addr: str) -> None:
for conn in connections.all():
# If using in-memory sqlite databases, pass the connections to
# the server thread.
if conn.vendor == 'sqlite' and conn.is_in_memory_db():
if conn.vendor == "sqlite" and conn.is_in_memory_db():
# Explicitly enable thread-shareability for this connection.
conn.inc_thread_sharing()
connections_override[conn.alias] = conn
Expand Down
4 changes: 2 additions & 2 deletions pytest_django/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ def get_order_number(test: pytest.Item) -> int:
uses_db = True
transactional = not issubclass(test_cls, TestCase)
else:
marker_db = test.get_closest_marker('django_db')
marker_db = test.get_closest_marker("django_db")
if marker_db:
(
transaction,
Expand All @@ -395,7 +395,7 @@ def get_order_number(test: pytest.Item) -> int:
else:
uses_db = False
transactional = False
fixtures = getattr(test, 'fixturenames', [])
fixtures = getattr(test, "fixturenames", [])
transactional = transactional or "transactional_db" in fixtures
uses_db = uses_db or "db" in fixtures

Expand Down

0 comments on commit c48b99e

Please sign in to comment.