Skip to content

using pytest fixture and test collection outside of pytest command line #9267

Answered by nicoddemus
movadaml asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @movadaml,

DIdn't look into the details, but if I were in the same situation I would approach this by calling pytest.main(..., plugins=[cocotb_plugin]), where cocotb_plugin is an instance of class which implements some pytest hooks, which are in turn used to communicate back to the cocotb frame work. This should provide some flexibility plus is the supported way to interact with pytest. Creating the structures and using them directly is not supported, and prone to break between pytest releases.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@movadaml
Comment options

Comment options

You must be logged in to vote
1 reply
@movadaml
Comment options

Answer selected by movadaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants