• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

OpenDataServices / flatten-tool / 6507626273

13 Oct 2023 11:25AM UTC coverage: 42.006% (-53.7%) from 95.72%
6507626273

Pull #433

github

odscjames
New "Geo" optional dependencies

https://github.com/OpenDataServices/flatten-tool/issues/424
Pull Request #433: New "Geo" optional dependencies

38 of 38 new or added lines in 6 files covered. (100.0%)

1466 of 3490 relevant lines covered (42.01%)

4.16 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

33.33
/flattentool/tests/test_input.py
1
# -*- coding: utf-8 -*-
2
"""
10✔
3
Tests of functions in input.py
4
Tests of SpreadsheetInput class and its children are in test_input_SpreadsheetInput*.py
5
"""
6
from __future__ import unicode_literals
10✔
7

8
from flattentool.input import path_search
10✔
9

10

11
def test_path_search():
10✔
12
    goal_dict = {}
×
13
    assert goal_dict is not {}  # following tests rely on this
×
14
    assert path_search(goal_dict, []) is goal_dict
×
15
    assert path_search({"testA": goal_dict}, ["testA"]) is goal_dict
×
16
    assert (
×
17
        path_search({"a1": {"b1": {"c1": goal_dict}}}, ["a1", "b1", "c1"]) is goal_dict
18
    )
19
    assert (
×
20
        path_search(
21
            {"a1": {"b1": {"c1": goal_dict}}},
22
            ["a1", "b1[]"],
23
            id_fields={"a1/b1[]/id": "c1"},
24
        )
25
        is goal_dict
26
    )
27
    assert (
×
28
        path_search(
29
            {"a1": {"b1": {"c1": goal_dict}}},
30
            ["a1[]", "c1"],
31
            id_fields={"a1[]/id": "b1"},
32
        )
33
        is goal_dict
34
    )
35
    # Top is always assumed to be an array
36
    assert (
×
37
        path_search(
38
            {"a1": {"b1": {"c1": goal_dict}}},
39
            ["a1", "c1"],
40
            id_fields={"a1/id": "b1"},
41
            top=True,
42
        )
43
        is goal_dict
44
    )
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc