[Tutor] Pytest help

Mark Lawrence breamoreboy at yahoo.co.uk
Tue Jul 7 12:39:51 CEST 2015


On 07/07/2015 03:16, Sahil Chauhan wrote:
> Hi,
>
> I am trying to use py.test for writing some selenium webdriver tests. I
> wrote my first test and
> pytest is deselecting that test even though I didn't mark any test.
>
> How can I resolve this issue?  Is there some default setting used by
> py.test,
>
> (qa)MacBook-Air:$  py.test tests/test_login.py
> ===========================================================================================
> test session starts
> ===========================================================================================
> platform darwin -- Python 2.7.6 -- pytest-2.2.4
> collected 1 items
>
> ===============================================================================
> *1 tests deselected by "-m 'nondestructive'" *
> ===============================================================================
> ======================================================================================
> 1 deselected in 0.01 seconds ==============
>
> Thanks in advance!
> Sahil
>

Hopefully this helps https://pytest.org/latest/example/markers.html 
based on your reference to "selenium webdriver tests" and its reference 
to "@pytest.mark.webtest".

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence



More information about the Tutor mailing list