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

[TODO] Implement smoke/sanity testing of circular imports #778

Closed
webknjaz opened this issue Jan 20, 2022 · 0 comments · Fixed by #779
Closed

[TODO] Implement smoke/sanity testing of circular imports #778

webknjaz opened this issue Jan 20, 2022 · 0 comments · Fixed by #779
Assignees
Labels
enhancement New feature or request new New issues and PRs to triaged structural Structural changes needed in code base tests Related to testing and CI

Comments

@webknjaz
Copy link
Member

ISSUE TYPE
  • testing improvement
SUMMARY

The current codebase is big and it's easy enough to introduce import order dependent code that produces load loops when misaligned.

There is an easy way to prevent this — copy+adjust the following test module that is based on what pytest does as well as a number of other projects I contributed to:
https://github.com/abhinavsingh/proxy.py/blob/develop/tests/test_circular_imports.py.

@webknjaz webknjaz added enhancement New feature or request new New issues and PRs to triaged labels Jan 20, 2022
@webknjaz webknjaz added needs_pr tests Related to testing and CI structural Structural changes needed in code base labels Jan 20, 2022
ansible-zuul bot pushed a commit that referenced this issue Jan 20, 2022
Test for circular imports in project

Resolves: #778
Test for circular imports in all local packages and modules.
This ensures all internal packages can be imported right away without any need to import some other module before doing so.
Related: #777

Reviewed-by: Sviatoslav Sydorenko <webknjaz+github/profile@redhat.com>
Reviewed-by: None <None>
Reviewed-by: Sorin Sbarnea <sorin.sbarnea@gmail.com>
Reviewed-by: Bradley A. Thornton <bthornto@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new New issues and PRs to triaged structural Structural changes needed in code base tests Related to testing and CI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants