Skip to content

Confusing error message KeyError("'__name__' not in globals",) #8

@jonathanfine

Description

@jonathanfine

This arises from a relative import in the test file. For example:

from .submodule import something

The user should write

from mypackage.submodule import something

The error message could be more helpful - it would be good to provide the offending line in the test file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions