dm-haiku
dm-haiku copied to clipboard
implemented unit tests for data_structures.py (cov 100%)
Implemented unit tests for data_structures.py. Now, coverage of this file is 100% :)
By the way, I think this function is not invoked when we call sorted().
FrozenList.__sorted__(self)
So, I called this function explicitly.
def test_sorted(self):
l1 = FrozenList([0, 3, 2])
l2 = FrozenList([0, 2, 3])
self.assertEqual(l1.__sorted__(), l2)
Sorry for the commit message without descriptions.
Hey chris-chris@, I have a fairly large change to this file coming soon which makes FlatMapping the default and (nearly) removes frozendict. I hope you don't mind if we hold off on your change until that is submitted?
I'm just working through the last few corner cases to make sure this is a drop in replacement for everyone.
@tomhennigan Okay- I'll rebase my branch then. Thanks for sharing that!
Hi Chris, we removed the Frozen* data structures from Haiku some time ago, so I will close this PR.