diff --git a/os_faults/api/human.py b/os_faults/api/human.py index d0ad4e0..7423341 100644 --- a/os_faults/api/human.py +++ b/os_faults/api/human.py @@ -37,7 +37,8 @@ Human API understands commands like these (examples): def list_actions(klazz): return set(m[0].replace('_', ' ') for m in inspect.getmembers( klazz, - predicate=lambda o: inspect.ismethod(o) and hasattr(o, '__public__'))) + predicate=lambda o: ((inspect.isfunction(o) or inspect.ismethod(o)) and + hasattr(o, '__public__')))) RANDOMNESS = {'one', 'random', 'some', 'single'} RANDOMNESS_PATTERN = '|'.join(RANDOMNESS) diff --git a/os_faults/tests/api/__init__.py b/os_faults/tests/api/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/os_faults/tests/test_human_api.py b/os_faults/tests/api/test_human_api.py similarity index 100% rename from os_faults/tests/test_human_api.py rename to os_faults/tests/api/test_human_api.py diff --git a/tox.ini b/tox.ini index 66abfc6..6d04e18 100644 --- a/tox.ini +++ b/tox.ini @@ -15,7 +15,6 @@ deps = -r{toxinidir}/test-requirements.txt commands = find . -type f -name "*.pyc" -delete py.test -vvvv --html={envlogdir}/pytest_results.html --self-contained-html --durations=10 "os_faults/tests" {posargs} -basepython = python2.7 passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY [testenv:common-constraints] @@ -35,12 +34,6 @@ commands = {posargs} install_command = {[testenv:common-constraints]install_command} commands = {posargs} -[testenv:py34] -basepython = python3.4 - -[testenv:py35] -basepython = python3.5 - [testenv:cover] commands = py.test --cov-config .coveragerc --cov-report html --cov=os_faults "os_faults/tests"