def test_mk_alloc_id_strings(): with pytest.raises(AssertionError): output = platform.mk_alloc_id("test", "test", "test")
def test_mk_alloc_id_no_args(): with pytest.raises(TypeError): output = platform.mk_alloc_id()
def test_mk_alloc_id_random_args(): output = platform.mk_alloc_id("test", 100, 2) assert output == 1636
def test_mk_alloc_id_default_value(): output = platform.mk_alloc_id(0, 100) assert output == 1124
def test_mk_alloc_id_both_max(): output = platform.mk_alloc_id(0, 127, 4) assert output == 2175
def test_mk_alloc_id_both_args_negative(): with pytest.raises(AssertionError): output = platform.mk_alloc_id(0, -1, -1)
def test_mk_alloc_id_idx_idx_too_big(): with pytest.raises(AssertionError): output = platform.mk_alloc_id(0, 0, 5)
def test_mk_alloc_id_onu_id_too_big(): with pytest.raises(AssertionError): output = platform.mk_alloc_id(0, 128, 0)
def test_mk_alloc_id_all_zeros(): output = platform.mk_alloc_id(0, 0, 0) assert output == 1024