Skip to content

Commit e81d5ce

Browse files
committed
Fix warnings in test_cascading_delete
1 parent 23529b4 commit e81d5ce

1 file changed

Lines changed: 7 additions & 10 deletions

File tree

tests/test_cascading_delete.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ def schema_simp_pop(schema_simp):
1717
def test_delete_tree(schema_simp_pop):
1818
assert not dj.config["safemode"], "safemode must be off for testing"
1919
assert (
20-
L() and A() and B() and B.C() and D() and E() and E.F(),
21-
"schema is not populated",
22-
)
20+
L() and A() and B() and B.C() and D() and E() and E.F()
21+
), "schema is not populated"
2322
A().delete()
2423
assert not A() or B() or B.C() or D() or E() or E.F(), "incomplete delete"
2524

@@ -64,10 +63,9 @@ def test_delete_tree_restricted(schema_simp_pop):
6463

6564
def test_delete_lookup(schema_simp_pop):
6665
assert not dj.config["safemode"], "safemode must be off for testing"
67-
assert (
68-
bool(L() and A() and B() and B.C() and D() and E() and E.F()),
69-
"schema is not populated",
70-
)
66+
assert bool(
67+
L() and A() and B() and B.C() and D() and E() and E.F()
68+
), "schema is not populated"
7169
L().delete()
7270
assert not bool(L() or D() or E() or E.F()), "incomplete delete"
7371
A().delete() # delete all is necessary because delete L deletes from subtables.
@@ -76,9 +74,8 @@ def test_delete_lookup(schema_simp_pop):
7674
def test_delete_lookup_restricted(schema_simp_pop):
7775
assert not dj.config["safemode"], "safemode must be off for testing"
7876
assert (
79-
L() and A() and B() and B.C() and D() and E() and E.F(),
80-
"schema is not populated",
81-
)
77+
L() and A() and B() and B.C() and D() and E() and E.F()
78+
), "schema is not populated"
8279
rel = L() & "cond_in_l"
8380
original_count = len(L())
8481
deleted_count = len(rel)

0 commit comments

Comments
 (0)