Open tbarron opened 6 years ago
(venv) > $ py.test [±ordict ●] ======================================== test session starts ======================================== platform darwin -- Python 3.6.1, pytest-3.0.7, py-1.5.2, pluggy-0.4.0 -- /Users/tbarron/.pyenv/versions/3.6.1/bin/python3.6 cachedir: .cache rootdir: /Users/tbarron/prj/github/docopt-dispatch, inifile: pytest.ini plugins: cov-2.5.1 collected 5 items test_docopt_dispatch.py::test_dispatch_can_dispatch_on_option FAILED ============================================= FAILURES ============================================== _______________________________ test_dispatch_can_dispatch_on_option ________________________________ test_docopt_dispatch.py:35: in test_dispatch_can_dispatch_on_option assert error.value.message == {'option': True, 'argument': None} E AttributeError: 'OptionMarker' object has no attribute 'message' !!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ===================================== 1 failed in 0.45 seconds ======================================
Using .args[0] rather than .message will work for both python 2.x and python 3.x
Using .args[0] rather than .message will work for both python 2.x and python 3.x