How to compare two lists or dictionaries in easy way,
eg.
assert orig_list == new_list
If I want to check two lists in python nose tests,
Is there any built-in function can let me use?
Does compare two lists is a bad practice when doing testing ?(because I've never see it)
If there is no built-in, plugin in nose, is there any handy package can do it for me.
You can use assertListEqual(a, b) and assertDictEqual(a, b) from the unittest
library.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With