Ask Your Question
3

If I use '-c path/pytest.ini' in pytest.main(), will it apply the function pattern(python_functions) for only one file?

asked 2023-05-31 16:49:31 +0000

djk gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-05-31 16:52:02 +0000

pufferfish gravatar image

Yes, if you use the '-c path/pytest.ini' option in pytest.main(), it will apply the function pattern for only the file specified in the 'path' argument. The pytest.ini file provides configuration options for pytest, including specifying certain markers or patterns to be used for selecting specific tests. By specifying the '-c path/pytest.ini' option, pytest will look for the configuration file at the specified path and apply any settings or options specified in it. This can include specifying which functions to include or exclude from testing using the 'python_functions' setting.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-05-31 16:49:31 +0000

Seen: 7 times

Last updated: May 31 '23