Проще:
```python
def assert_equal(a, b, message='not equal'):
    assert a == b, message
```