コード例 #1
0
def test_map_should_return_new_instance_of_box():
    box = Box(42)
    mapped_box = box.map(increase)
    assert box is not mapped_box
コード例 #2
0
def test_map_should_return_box_with_mapped_value():
    box = Box(42)
    assert box.map(increase) == Box(43)