dm-haiku icon indicating copy to clipboard operation
dm-haiku copied to clipboard

implemented unit tests for data_structures.py (cov 100%)

Open chris-chris opened this issue 5 years ago • 3 comments

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)

chris-chris avatar Apr 01 '20 18:04 chris-chris

Sorry for the commit message without descriptions.

chris-chris avatar Apr 01 '20 18:04 chris-chris

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 avatar Apr 03 '20 10:04 tomhennigan

@tomhennigan Okay- I'll rebase my branch then. Thanks for sharing that!

chris-chris avatar Apr 04 '20 14:04 chris-chris

Hi Chris, we removed the Frozen* data structures from Haiku some time ago, so I will close this PR.

superbobry avatar Sep 12 '23 09:09 superbobry