alfredodeza / pytest.vim

Runs your UnitTests with py.test displaying red/green bars and errors
274 stars 40 forks source link

`Pytest function` files for marked functions. #44

Closed DerWeh closed 7 years ago

DerWeh commented 7 years ago

If I run the :Pytest function command on a function marked with the decorator @pytest.mark.xfail(raises=ValueError) I get the error message

Unable to parse output. If using a plugin that alters the default output, consider disabling it. See :Pytest session

Removing the the decorator gives the expected output showing the Value error.

alfredodeza commented 7 years ago

@DerWeh would you mind including the :Pytest session full output so I can take a look? If the plugin fully fails to capture and properly parse the output it will display that message. To try a fix I need this output. Thanks!

DerWeh commented 7 years ago

Here is the full output:


    1 ============================= test session starts ==============================
    2 platform linux2 -- Python 2.7.9, pytest-3.0.3, py-1.4.31, pluggy-0.4.0
    3 rootdir: /home/andreas/studium/theo3/poisson_dmft/test, inifile: 
    4 plugins: cov-2.3.1, xdist-1.15.0
    5 collected 5 items
    6 
    7 test_param.py x
    8 
    9 ============================== 4 tests deselected ==============================
   10 =================== 4 deselected, 1 xfailed in 0.25 seconds ====================
   11 
alfredodeza commented 7 years ago

Aha! Yep, this will break it. I know how to fix it though! I should have something done in a little bit. Thanks for getting me the output

alfredodeza commented 7 years ago

@DerWeh can you pull the latest changes and see if that fixes it for you? This commit deals with this exact situation 1f1d413aae9669095f61a46ea11c5b030b796cd0

DerWeh commented 7 years ago

Thanks everything is fine now.