diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..ba4c69b --- /dev/null +++ b/ChangeLog @@ -0,0 +1 @@ +.. This is a generated file! Do not edit. diff --git a/automaton/_utils.py b/automaton/_utils.py index 471701e..49feb02 100644 --- a/automaton/_utils.py +++ b/automaton/_utils.py @@ -42,7 +42,9 @@ def get_callback_name(cb): return repr(cb) else: try: - segments.insert(0, cb.__module__) + # When running under sphinx it appears this can be none? + if cb.__module__: + segments.insert(0, cb.__module__) except AttributeError: pass return ".".join(segments) diff --git a/doc/source/examples.rst b/doc/source/examples.rst index 736ac97..25f4538 100644 --- a/doc/source/examples.rst +++ b/doc/source/examples.rst @@ -42,6 +42,7 @@ Transitioning a simple machine m.process_event('fall') print(m.pformat()) print(m.current_state) + print(m.terminated) **Expected output:** diff --git a/test-requirements.txt b/test-requirements.txt index 3e77e7a..14c39c2 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -4,6 +4,7 @@ hacking<0.11,>=0.10.0 +doc8 # Apache-2.0 coverage>=3.6 discover python-subunit>=0.0.18 diff --git a/tox.ini b/tox.ini index cd87575..47e4134 100644 --- a/tox.ini +++ b/tox.ini @@ -21,6 +21,12 @@ commands = python setup.py test --slowest --testr-args='{posargs}' [testenv:pep8] commands = flake8 {posargs} +[testenv:py27] +commands = + python setup.py testr --slowest --testr-args='{posargs}' + sphinx-build -b doctest doc/source doc/build + doc8 doc/source + [testenv:venv] basepython = python2.7 commands = {posargs}