Default invocation of pytest for qadevel projects

Kamil Paral kparal at redhat.com
Thu Mar 6 10:44:15 UTC 2014


> For the qadevel projects I'm aware of, we've been using pytest for our
> unit/functional test runner.
> 
> As part of the shared configuration, tests are split up into two
> categories, unit and functional. Unit tests are fast, do not touch the
> network, database or filesystem (there are some exceptions to that last
> part, though). Functional tests tend to be more integration tests that
> can set up a database or do other actions which fall outside of the
> previous definition of "unit test".
> 
> When you run pytest without any extra args, only the unit tests are
> run. The '--functional' arg is needed to enable collection and
> execution of the functional tests.
> 
> Kamil recently made a request [1] to do one of two things:
> 
> [1] https://phab.qadevel.cloud.fedoraproject.org/T89
> 
> 1. Change the default such that functional tests are collected and
> exclude them from collection using a '--unit' arg
> 
> 2. Change the functional arg from '--functional' to something shorter,
> like '--func'
> 
>   * note that there are restrictions on which args we can use. For
>     example, '-f' is not allowed as single letter args are reserved for
>     pytest itself
> 
> As stated in T89, I don't have a strong opinion on this as long as it's
> possible to exclude the functional tests from collection and we make
> the same change across all of our active projects. However, I wanted to
> put this up for a wider discussion before changing things.
> 
> Any other thoughts on this proposed change?

I should remember to read the mailing list before the Phab comments. I already closed the task as wontfix with my comment included:
https://phab.qadevel.cloud.fedoraproject.org/T89#9

I agree that you have a point in running just the unit tests by default. Changing --functional to --func would be nice, though. It even matches the file prefix for func tests, 'functest_'.


More information about the qa-devel mailing list