When writing asserts in tests, do you put the actual first or the expected?

The convention seems to be: actual first. But, annoyingly, I need to rearrange them to check if an expected is _in_ an actual which I tend to do a fair amount.

Maybe that's a testing code smell. Or maybe I'm just overthinking this. ๐Ÿ˜…

# actual first
assert actual == expected

# expected first
assert expected == actualexpected = 2
actual = [1, 2, 3]

# this reads well, but expected is first
assert expected in actual

# this seems messy?
assert actual.index(expected) > -1
0

If you have a fediverse account, you can quote this note from your own instance. Search https://indieweb.social/users/adamghill/statuses/115746197568087784 on your instance and quote it. (Note that quoting is not supported in Mastodon.)