@pytest.mark.cmd
def test_test_checks_srctgt_pass(capfd):
 call_command('test_checks', '--source="Files"', '--target="Leers"')
 (out, err) = capfd.readouterr()
 assert ('No errors found' in out)

@ pytest . mark . cmd def test_test_checks_srctgt_pass ( capfd ) : call_command ( 'test_checks' , '--source="Files"' , '--target="Leers"' ) ( out , err ) = capfd . readouterr ( ) assert ( 'No errors found' in out )
passing --source --target check .