Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test_union_cli() test #5

Closed
jqtrde opened this issue Feb 6, 2016 · 0 comments
Closed

Fix test_union_cli() test #5

jqtrde opened this issue Feb 6, 2016 · 0 comments
Assignees
Labels

Comments

@jqtrde
Copy link
Contributor

jqtrde commented Feb 6, 2016

Le fail

test_union_cli() is failing with:

    def test_union_cli():
        filename = os.path.join(os.path.dirname(__file__), 'fixtures/tiles.txt')
        expectedFilename = os.path.join(os.path.dirname(__file__), 'expected/unioned.txt')
        runner = CliRunner()
        result = runner.invoke(cli, ['union', filename])
        assert result.exit_code == 0
        with open(expectedFilename) as ofile:
            expected = ofile.read()
>       assert result.output == expected
E       assert '{"geometry":...erties": {}}\n' == '{"geometry": ...rties": {}}\n'
E         Skipping 8578 identical leading characters in diff, use -v to show
E         - ates": [[[3.3837890625000004, 49.29647160265806], [3.3837890625000004, 49.23912083246695], [3.5156250000000004, 49.23912083246695], [3.5156250000000004, 49.26780455063751], [3.427734375, 49.26780455063751], [3.427734375, 49.29647160265806], [3.3837890625000004, 49.29647160265806]]]}, "type": "Feature", "properties": {}}
E         + ates": [[[4.04296875, 49.32512199103999], [4.04296875, 49.21042044565028], [4.1748046875, 49.21042044565028], [4.1748046875, 49.32512199103999], [4.04296875, 49.32512199103999]], [[4.0869140625, 49.29647160265806], [4.130859375, 49.29647160265806], [4.130859375, 49.23912083246695], [4.0869140625, 49.23912083246695], [4.0869140625, 49.29647160265806]]]}, "type": "Feature", "properties": {}}
E         + {"geometry": {"type": "Polygon", "coordinates": [[[3.3837890625000004, 49.29647160265806], [3.3837890625000004, 49.23912083246695], [3.5156250000000004, 49.23912083246695], [3.5156250000000004, 49.26780455063751], [3.427734375, 49.26780455063751], [3.427734375, 49.29647160265806], [3.3837890625000004, 49.29647160265806]]]}, "type": "Feature", "properties": {}}
E           {"geometry": {"type": "Polygon", "coordinates": [[[3.2958984375, 49.23912083246695], [3.2958984375, 49.21042044565028], [3.3398437500000004, 49.21042044565028], [3.3398437500000004, 49.23912083246695], [3.2958984375, 49.23912083246695]]]}, "type": "Feature", "properties": {}}
E           {"geometry": {"type": "Polygon", "coordinates": [[[3.3398437500000004, 49.21042044565028], [3.3398437500000004, 49.1817033877066], [3.3837890625000004, 49.1817033877066], [3.3837890625000004, 49.21042044565028], [3.3398437500000004, 49.21042044565028]]]}, "type": "Feature", "properties": {}}
E           {"geometry": {"type": "Polygon", "coordinates": [[[3.3837890625000004, 49.06666839558114], [3.3837890625000004, 49.00905080938203], [3.4716796875, 49.00905080938203], [3.4716796875, 49.06666839558114], [3.3837890625000004, 49.06666839558114]]]}, "type": "Feature", "properties": {}}
E           {"geometry": {"type": "Polygon", "coordinates": [[[3.3837890625000004, 48.98021698537497], [3.3837890625000004, 48.92249926375822], [3.427734375, 48.92249926375822], [3.427734375, 48.9513664709477], [3.4716796875, 48.9513664709477], [3.4716796875, 48.98021698537497], [3.3837890625000004, 48.98021698537497]]]}, "type": "Feature", "properties": {}}
E           {"geometry": {"type": "Polygon", "coordinates": [[[3.2958984375, 48.9513664709477], [3.2958984375, 48.92249926375822], [3.3398437500000004, 48.92249926375822], [3.3398437500000004, 48.9513664709477], [3.2958984375, 48.9513664709477]]]}, "type": "Feature", "properties": {}}
E         Detailed information truncated (52 more lines), use "-vv" to show

Le solution

I don't think this is an error with supermercado itself, I think the expected results are incorrect.

cat tests/expected/unioned.txt | fio collect looks like the result of supermercado edges tests/fixtures/tiles.txt | supermercado union | fio collect — See here

Instead, it should look like the result of supermercado union tests/fixtures/tiles.txt | fio collect — See here

@jqtrde jqtrde added the bug label Feb 6, 2016
@jqtrde jqtrde self-assigned this Feb 6, 2016
@jqtrde jqtrde closed this as completed in 25cb65a Feb 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant