mardi 28 août 2018

How to use pytest capsys on tests that have mocking decorators?

I have being trying to find a way to use mocking decorators and pytest capsys at the same time but I wasn't able to find the right way to do it.

import pytest
import requests_mock


@requests_mock.mock()
def test_with_mock(m):
    pass

def test_with_capsys(capsys):
    pass


# how to write a test that works with both?

Aucun commentaire:

Enregistrer un commentaire