Skip to content

Commit

Permalink
issue 258 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickthornton committed Jul 31, 2024
1 parent 2b2bffe commit 35905d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions movies/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ def test9():
"Rupert Grint",
"Daniel Radcliffe",
"Emma Watson",
"Emma Watson",

This comment has been minimized.

Copy link
@poisonvine

poisonvine Sep 14, 2024

Is there supposed to be a duplicate of Emma Watson?

This comment has been minimized.

Copy link
@curiouskiwi

curiouskiwi Sep 14, 2024

Contributor

Yes. Two different people (ie, with different ids) with the same name.

],
ordered=True,
)
Expand Down Expand Up @@ -221,14 +222,17 @@ def check_single_col(actual, expected, ordered=False):
# Get data from column
try:
result = [str(list(row.values())[0]) for row in actual]
result = result if ordered else set(result)
except IndexError:
return None

# Check column data against expected values
expected = [str(value) for value in expected]

# If unordered, sort both before checking
if not ordered:
expected = set(expected)
result.sort()
expected.sort()

if result != expected:
raise check50.Mismatch("\n".join(expected), "\n".join(list(result)))

Expand Down
Binary file modified movies/movies.db
Binary file not shown.

0 comments on commit 35905d1

Please sign in to comment.