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

Move test server to a separately importable module #990

Closed
wants to merge 2 commits into from

Conversation

florimondmanca
Copy link
Member

Refs #650, prompted by #985 (comment)

Being able to import the test Server is required* for annotating tests.

*At least, it's required with our current test setup. Dunno if we might want to consider tweaking our mypy configuration with --check-untyped-defs, so that the inside of test functions is type checked even though their signature is not annotated. In general it's really the inside of tests (calls to HTTPX) that we want to make sure provide a good typing experience — type hinting the test function signatures doesn't provide a huge gain (but on the contrary a non-negligible amount of work is required if we did want to annotate them all).

So, marking this as a draft for now…

@florimondmanca florimondmanca added tooling Changes to our CI/CD, tests setup, etc. refactor Issues and PRs related to code refactoring labels May 24, 2020
@florimondmanca
Copy link
Member Author

Closing as I think #991 might be a better approach for us - one that will not even require adding server: Server annotations everywhere just to have mypy type check the inside of test functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Issues and PRs related to code refactoring tooling Changes to our CI/CD, tests setup, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant