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

pytestのフィクスチャをテスト間で共有するには、importではなくconftest.pyを使う #2

Merged
merged 1 commit into from
Mar 18, 2024

Conversation

ftnext
Copy link
Contributor

@ftnext ftnext commented Mar 17, 2024

関連する Issue / PR

#1 が大きいので、変更を小さく切り出してPRを送ります

PR をマージした後の挙動の変化

pytestのフィクスチャの共有をあるべきやり方に修正します。
挙動の変化はありません

挙動の変更を達成するために行ったこと

conftest.pyを使ってフィクスチャを共有するようにしました。
参考までに拙ブログです:https://nikkie-ftnext.hatenablog.com/entry/share-pytest-fixtures-with-conftestpy

動作確認

  • テストが通ることを確認した

Copy link
Collaborator

@ryokan0123 ryokan0123 left a comment

Choose a reason for hiding this comment

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

早速の contribute ありがとうございます、勉強になります!
PR 取り入れさせていただきます〜

@ryokan0123 ryokan0123 merged commit d9e52fd into sbintuitions:main Mar 18, 2024
3 checks passed
@lsz05 lsz05 mentioned this pull request Apr 24, 2024
1 task
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