def test_ranges_by_key2(): rd1 = RangeDictionary(10, defaults) assert [(0, 10, "alpha")] == rd1.get_ranges(key="a") rd1[4]["a"] = "foo" assert [(0, 4, "alpha"), (4, 5, "foo"), (5, 10, "alpha")] == \ rd1.get_ranges(key="a")
def test_ranges_by_key(): rd1 = RangeDictionary(10, defaults) assert [(0, 10, "alpha")] == rd1.get_ranges(key="a")