Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_generate_id_within_group_valueerror(dataframe, message):
with raises(ValueError, message=message):
utils.generate_id_within_group(dataframe, ["a", "b"])
def test_generate_id_within_group(dataframe, expected):
assert (utils.generate_id_within_group(dataframe, ["a", "b"]) == expected).all()