def test_scale_table_default(): table = get_scale_table() assert SCALES_MIN == 0.11 assert SCALES_MAX == 256 assert SCALES_LEVELS == 64 assert table[0] == SCALES_MIN assert table[-1] == SCALES_MAX assert len(table.size()) == 1 assert table.size(0) == SCALES_LEVELS
def test_scale_table_custom(): table = get_scale_table(0.02, 1337, 32) assert pytest.approx(table[0].item(), 0.02) assert pytest.approx(table[-1].item(), 1337) assert len(table.size()) == 1 assert table.size(0) == 32
def test_scale_table_custom(): table = get_scale_table(0.02, 1337, 32) assert table[0] == 0.02 assert table[-1] == 1337 assert len(table.size()) == 1 assert table.size(0) == 32