Then the assert() triggers and you fix the assert() (or the bug). What's the issue here?
if (condition):
...
else:
assert(!condition)
...
When you could instead
if (condition):
...
else: #if (condition)
...Or otherwise explicitly comment the condition that was checked earlier. At least then if the comment is unchanged, whoever is touching your code will assume the comment is outdated, rather than assuming that you're asserting that x should be some undocumented magic number.