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

feat: pytest-playwright-asyncio as separate plugin #257

Merged
merged 2 commits into from
Nov 14, 2024

Conversation

mxschmitt
Copy link
Member

@mxschmitt mxschmitt commented Nov 13, 2024

Similar to #184 just as a separate plugin. The main reason for this is that Pylance, the Python language server for VSCode does automatically look for Pytest plugins in order to provide fixture autocompletion. This isn't possible when we dynamically register the plugins, since it just looks at the AST.

If a user wants to partially migrate from sync to async or vice-versa, the user can run Pytest twice, one time with -p no:playwright and one time with no:playwright-asyncio.

Pretty-diff between async fixtures and sync fixtures: eb6c55a

Closes #184
Relates #74

@mxschmitt mxschmitt force-pushed the async-plugin-separate-package branch 2 times, most recently from ec57569 to cd9d583 Compare November 13, 2024 14:26
@mxschmitt mxschmitt changed the title feat: playwright-python-asyncio as separate plugin feat: playwright-python-pytest as separate plugin Nov 13, 2024
@mxschmitt mxschmitt changed the title feat: playwright-python-pytest as separate plugin feat: pytest-playwright-asyncio as separate plugin Nov 13, 2024
@mxschmitt mxschmitt force-pushed the async-plugin-separate-package branch 2 times, most recently from 41864d8 to cc1f672 Compare November 13, 2024 14:46
@mxschmitt mxschmitt force-pushed the async-plugin-separate-package branch 5 times, most recently from a8e4767 to b49d730 Compare November 13, 2024 20:53
Copy link
Member

@yury-s yury-s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm provided there is an

  • easy way to run both sync and async in same project
  • we extract common bits from the two implementations into a shared file

@mxschmitt mxschmitt force-pushed the async-plugin-separate-package branch 3 times, most recently from a82be11 to 64fa648 Compare November 14, 2024 09:40
@mxschmitt mxschmitt force-pushed the async-plugin-separate-package branch from 64fa648 to f7aeadd Compare November 14, 2024 09:45
@mxschmitt mxschmitt merged commit fb7fb33 into main Nov 14, 2024
16 checks passed
@mxschmitt mxschmitt deleted the async-plugin-separate-package branch November 14, 2024 09:53
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

Successfully merging this pull request may close these issues.

2 participants