Skip to content

Commit

Permalink
Merge pull request #80 from phobson/set-items-as-strings
Browse files Browse the repository at this point in the history
convert set items to strings to get_step_report
  • Loading branch information
rich-iannone authored Mar 5, 2025
2 parents 2b43d27 + 0597303 commit 9b78377
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pointblank/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -8458,7 +8458,7 @@ def _step_report_row_based(
symbol_right = ">" if inclusive[1] else "≥"
text = f"<code style='color: #303030; font-family: monospace; font-size: smaller;'>{column} {symbol_left} {values[0]}, {column} {symbol_right} {values[1]}</code>"
elif assertion_type == "col_vals_in_set":
elements = ", ".join(values)
elements = ", ".join(map(str, values))
text = f"<code style='color: #303030; font-family: monospace; font-size: smaller;'>{column} &isinv; {{{elements}}}</code>"
elif assertion_type == "col_vals_not_in_set":
elements = ", ".join(values)
Expand Down
1 change: 1 addition & 0 deletions tests/test_validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -5442,6 +5442,7 @@ def test_get_step_report_no_fail(tbl_type):
.col_vals_ge(columns="d", value=500)
.col_vals_between(columns="a", left=2, right=10)
.col_vals_outside(columns="a", left=7, right=20)
.col_vals_in_set(columns="a", set=[1, 2, 3, 4, 5])
.col_vals_in_set(columns="f", set=["low", "mid", "high"])
.col_vals_not_in_set(columns="f", set=["l", "mid", "m"])
.col_vals_null(columns="b")
Expand Down

0 comments on commit 9b78377

Please sign in to comment.