diff options
author | Dan Radez <dradez@redhat.com> | 2016-06-20 05:56:34 -0400 |
---|---|---|
committer | Dan Radez <dradez@redhat.com> | 2016-06-30 18:18:00 -0400 |
commit | 45fabbab6a4107df8a32f09045cf955afeb2e4ac (patch) | |
tree | 15b49db13ffb5b17ff69ef84ed298531184c3072 /build | |
parent | 0b91edabf51d60968a20d605dd2b97f03283e06b (diff) |
Syntax updates and new tests
- syntax updates to match pep8 standards
- tests to cover apex_python_utils.py
Change-Id: Ifac06fdbb97266f1b574b20610979b6965d6dd55
Signed-off-by: Dan Radez <dradez@redhat.com>
Diffstat (limited to 'build')
-rw-r--r-- | build/Makefile | 15 | ||||
-rw-r--r-- | build/opnfv-apex-common.spec | 2 |
2 files changed, 14 insertions, 3 deletions
diff --git a/build/Makefile b/build/Makefile index 0763d361..84305618 100644 --- a/build/Makefile +++ b/build/Makefile @@ -66,12 +66,23 @@ $(RPMCOM): .PHONY: python-tests python-tests: + # clean previous coverage data + rm -rf ../tests/.coverage + rm -rf ../tests/htmlcov # run nose tests - cd ../tests && PYTHONPATH=../lib/python/ nosetests-3.4 . --with-coverage --cover-package apex + cd ../tests && PYTHONPATH=../lib/python/ nosetests-3.4 . --with-coverage --cover-package apex --cover-package apex_python_utils --cover-html --cover-min-percentage 85 + # generate reports - cd ../tests && coverage3 html --include '*lib/python/*' cd ../tests && coverage3 report --include '*lib/python/*' -m +####################### +# PYTHON PEP8 CHECK # +####################### + +.PHONY: python-pep8-check +python-pep8-check: + pep8 ../lib/python + pep8 ../tests ############### # UNDERCLOUD # diff --git a/build/opnfv-apex-common.spec b/build/opnfv-apex-common.spec index d5532411..5abd4493 100644 --- a/build/opnfv-apex-common.spec +++ b/build/opnfv-apex-common.spec @@ -53,7 +53,7 @@ install config/network/network_settings_v6.yaml %{buildroot}%{_sysconfdir}/opnfv mkdir -p %{buildroot}%{_var}/opt/opnfv/lib/python/apex install lib/common-functions.sh %{buildroot}%{_var}/opt/opnfv/lib/ install lib/utility-functions.sh %{buildroot}%{_var}/opt/opnfv/lib/ -install lib/python/apex-python-utils.py %{buildroot}%{_var}/opt/opnfv/lib/python/ +install lib/python/apex_python_utils.py %{buildroot}%{_var}/opt/opnfv/lib/python/ mkdir -p %{buildroot}%{python3_sitelib}/apex/ install lib/python/apex/__init__.py %{buildroot}%{python3_sitelib}/apex/ install lib/python/apex/deploy_env.py %{buildroot}%{python3_sitelib}/apex/ |