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

SEGFAULT in CI but works locally #563

Open
Kishan-Ved opened this issue Jun 25, 2024 · 0 comments
Open

SEGFAULT in CI but works locally #563

Kishan-Ved opened this issue Jun 25, 2024 · 0 comments

Comments

@Kishan-Ved
Copy link
Contributor

Description of the problem

In the file: pydatastructs/trees/tests/test_binary_trees.py, inside the _test_SplayTree() function:
There are 2 code snippets which run only when the backend is Python. This is because if we run them in C++ backend, the CI checks fail. However, the code passes when run on my local machine (laptop - Ubuntu).

These are the code snippets:

    if(backend==Backend.PYTHON):
        trav3 = BinaryTreeTraversal(t, backend=backend)
        in_order = trav3.depth_first_search(order='in_order')
        pre_order = trav3.depth_first_search(order='pre_order')
        assert [node.key for node in in_order] == [20, 30, 50, 55, 100, 200, 1000, 2000]
        assert [node.key for node in pre_order] == [200, 55, 50, 30, 20, 100, 2000, 1000]
    if(backend==Backend.PYTHON):
        trav5 = BinaryTreeTraversal(t, backend=backend)
        in_order = trav5.depth_first_search(order='in_order')
        pre_order = trav5.depth_first_search(order='pre_order')
        assert [node.key for node in in_order] == [20, 30, 50, 55, 100, 200]
        assert [node.key for node in pre_order] == [200, 55, 50, 30, 20, 100]

This was added in PR: #562

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant