def test_noop(): """Ensure docopt exit (displays usage) """ with pytest.raises(DocoptExit): main([]) with pytest.raises(DocoptExit): main(['foobar'])