@pytest.mark.cmd
def test_test_checks_srctgt_missing_args():
 with pytest.raises(CommandError) as e:
  call_command('test_checks', '--source="files"')
 assert ('Use a pair of --source and --target' in str(e))
 with pytest.raises(CommandError) as e:
  call_command('test_checks', '--target="leers"')
 assert ('Use a pair of --source and --target' in str(e))

@ pytest . mark . cmd def test_test_checks_srctgt_missing_args ( ) : with pytest . raises ( CommandError ) as e : call_command ( 'test_checks' , '--source="files"' ) assert ( 'Use a pair of --source and --target' in str ( e ) ) with pytest . raises ( CommandError ) as e : call_command ( 'test_checks' , '--target="leers"' ) assert ( 'Use a pair of --source and --target' in str ( e ) )
check a --source --target with incomplete options .