def test_coordinatestmt_factory():
    settings = FileSettings(format=(2, 5), zero_suppression='trailing',
                            units='inch', notation='absolute')

    line = 'X0278207Y0065293'
    stmt = CoordinateStmt.from_excellon(line, settings)
    assert_equal(stmt.x, 2.78207)
    assert_equal(stmt.y, 0.65293)

    # line = 'X02945'
    # stmt = CoordinateStmt.from_excellon(line)
    # assert_equal(stmt.x, 2.945)

    # line = 'Y00575'
    # stmt = CoordinateStmt.from_excellon(line)
    # assert_equal(stmt.y, 0.575)

    settings = FileSettings(format=(2, 4), zero_suppression='leading',
                            units='inch', notation='absolute')

    line = 'X9660Y4639'
    stmt = CoordinateStmt.from_excellon(line, settings)
    assert_equal(stmt.x, 0.9660)
    assert_equal(stmt.y, 0.4639)
    assert_equal(stmt.to_excellon(settings), "X9660Y4639")
    assert_equal(stmt.units, 'inch')

    settings.units = 'metric'
    stmt = CoordinateStmt.from_excellon(line, settings)
    assert_equal(stmt.units, 'metric')
test 'exclude' in merge
dataset/ETHPy150Open curtacircuitos/pcb-tools/gerber/tests/test_excellon_statements.py/test_coordinatestmt_factory--crossover with--dataset/ETHPy150Open mission-liao/pyswagger/pyswagger/tests/test_base.py/SwaggerBaseTestCase.test_merge_exclude