Default invocation of pytest for qadevel projects

Tim Flink tflink at redhat.com
Wed Mar 5 20:07:54 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?

Tim
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://lists.fedoraproject.org/pipermail/qa-devel/attachments/20140305/16d56a4a/attachment.sig>


More information about the qa-devel mailing list