The idiomatic way of comparing with None is x is (not) None as opposed to x == None. I could see a weak argument about the symmetry in the 4 assertion statements in the edge and corner cases section to leave it that way but I would suggest using the idiomatic form.