On Thu, Mar 5, 2020 at 3:18 PM Marcin Sobczyk <msobczyk(a)redhat.com> wrote:
I've been experimenting with porting basic suite from nose to pytest.
The rationale behind my efforts were nose being deprecated since a long
time  and the ability to use pytest's awesome fixtures.
Turns out it's not really that hard - with two patches  I was able
to lay the groundwork for non-distruptive and incremental process
of porting the basic suite module by module. You can find the steps
needed to port a certain module described in . Please find
the patches that do the actual porting in this topic .
One of the hurdles of using pytest vs nose is that the former
the test functions in the order they appear in the module. This comes
from the reasoning, that tests should be independent, which is not the
case for OST. Reordering the test functions to match '_TEST_LIST'
for '002_bootstrap' and '004_basic_sanity' modules would make
a huge disruption, so I've decided to use a 'pytest-ordering' plugin that
allows you to define the order with '(a)pytest.mark.run(order=)' decorators.
Until we get rid of dependencies between tests, this sounds like a reasonable