コード例 #1
0
def tile_origin_calc(tile_code):
        expected_xorg = DATA_DICT[tile_code]["xorg"]
        expected_yorg = DATA_DICT[tile_code]["yorg"]
        print("{}: expected xorg: {}, expected_yorg {}".format(tile_code, expected_xorg, expected_yorg))
        calc_xorg, calc_yorg = tile_origin(tile_code)
        assert_equal(calc_xorg, expected_xorg)
        assert_equal(calc_yorg, expected_yorg)
コード例 #2
0
def test_tile_org():
    for tile_code in DATA_DICT.keys():
        expected_xorg = DATA_DICT[tile_code]["xorg"]
        expected_yorg = DATA_DICT[tile_code]["yorg"]
        print("{}: expected xorg: {}, expected_yorg {}".format(tile_code, expected_xorg, expected_yorg))
        calc_xorg, calc_yorg = tile_origin(tile_code)
        assert_equal(calc_xorg, expected_xorg)
        assert_equal(calc_yorg, expected_yorg)