gh-94808: add tests covering PySequence_[InPlace]Concat
by sobolevn · Pull Request #99319 · python/cpython (original) (raw)
Sorry, it took me quite longer than I expected to get back to it :)
I've addressed your main review points. I went with very defensive asserts in this case.
I agree that most of them do not make much sense.
So, I've made several changes to this PR:
- I've added more cases for subtypes to cover all combinations: subtype + subtype, subtype + parent, parent + subtype. It does not really affect coverage, but it feels like a right thing to do
- I've remove all type assertions except: results, arguments that do mutate (
iconcat
andlist
) - I've changed type assertions for
tuple
andlist
to be exact, for example:self.assertIs(type(res), tuple)
So, I hope it should be good now!
Thanks again for the review, it helped a lot!