Skip to content

Commit

Permalink
nit: make test a bit less opaque
Browse files Browse the repository at this point in the history
  • Loading branch information
dmadisetti committed Dec 27, 2024
1 parent 7e72191 commit d0d4c83
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
3 changes: 2 additions & 1 deletion tests/_ast/cell_data/named_cells.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ def unhashable_defined():


@app.cell
def unhashable_required(unhashable):
def unhashable_override_required(unhashable):
assert unhashable == {0, 1}
unhashable
return


Expand Down
11 changes: 8 additions & 3 deletions tests/_ast/test_cell.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,13 +191,18 @@ def test_import() -> None:
def test_unhashable_import() -> None:
from cell_data.named_cells import (
unhashable_defined,
unhashable_required,
unhashable_override_required,
)

assert unhashable_defined.name == "unhashable_defined"
assert unhashable_required.name == "unhashable_required"
assert (
unhashable_override_required.name == "unhashable_override_required"
)

unhashable_required.run(unhashable={0, 1})
assert unhashable_override_required.run(unhashable={0, 1}) == (
{0, 1},
{},
)
assert unhashable_defined.run() == (
{0, 1, 2},
{"unhashable": {0, 1, 2}},
Expand Down

0 comments on commit d0d4c83

Please sign in to comment.