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

externals are excluding dependencies withth same prefix as the source module #146

Open
dsun-cp opened this issue May 12, 2022 · 0 comments

Comments

@dsun-cp
Copy link

dsun-cp commented May 12, 2022

Here is a test case

def test_relative_imports_same_prefix(capsys):
    files = """
        foo:
            - __init__.py
            - a.py: |
                from foobar import b
        foobar:
            - __init__.py
            - b.py
    """
    with create_files(files) as workdir:
        assert simpledeps('foo') == {
            'foobar -> foo.a',
            'foobar.b -> foo.a'
        }
        pydeps(fname='foo', externals=True)
        io = capsys.readouterr()
        assert ast.literal_eval(io.out) == ['foobar']

At the last line, the current bug is causing it returning []

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