To test for a specific exception in unit testing, use pytest.raises.
For example, you can use it to test if a ValueError is thrown when there are NaN values in the group column.
To test for a specific exception in unit testing, use pytest.raises.
For example, you can use it to test if a ValueError is thrown when there are NaN values in the group column.