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

Address xfail unit test #162

Open
mfitz opened this issue Dec 7, 2022 · 0 comments
Open

Address xfail unit test #162

mfitz opened this issue Dec 7, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@mfitz
Copy link
Contributor

mfitz commented Dec 7, 2022

The unit test test_core_schedule_elements.py::test_splitting_service_edge_case_on_direction_results_in_two_directions is currently marked as xfail, meaning it is executed as normal with the test suite, but expected to fail (which it does). After removing the xfail decorator:

test_core_schedule_elements.py::test_splitting_service_edge_case_on_direction_results_in_two_directions FAILED [100%]
tests/test_core_schedule_elements.py:599 (test_splitting_service_edge_case_on_direction_results_in_two_directions)
[{'1_dir_1'}, {'2_dir_2'}, {'3_dir_1'}, {'4_dir_1'}] != [{'3_dir_1', '4_dir_1', '1_dir_1'}, {'2_dir_2'}]

Expected :[{'3_dir_1', '4_dir_1', '1_dir_1'}, {'2_dir_2'}]
Actual   :[{'1_dir_1'}, {'2_dir_2'}, {'3_dir_1'}, {'4_dir_1'}]
<Click to see difference>

service_edge_case_loopy_and_non_overlapping_graph = <Service instance at 5144736848: with 4 routes>

    def test_splitting_service_edge_case_on_direction_results_in_two_directions(
            service_edge_case_loopy_and_non_overlapping_graph):
        routes, graph_groups = service_edge_case_loopy_and_non_overlapping_graph.split_graph()
>       assert routes == [{'1_dir_1', '3_dir_1', '4_dir_1'}, {'2_dir_2'}]
E       AssertionError: assert [{'1_dir_1'}, {'2_dir_2'}, {'3_dir_1'}, {'4_dir_1'}] == [{'3_dir_1', '4_dir_1', '1_dir_1'}, {'2_dir_2'}]

test_core_schedule_elements.py:603: AssertionError

Assertion failed

We shouldn't leave the test as xfail, we should address why the test is failing, fix whatever needs fixing, and reintroduce the test to the test suite.

@mfitz mfitz added the bug Something isn't working label Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant