From 58bf891dffae71a766a89910e6fb01703faae8fa Mon Sep 17 00:00:00 2001 From: Bartek Grzybowski Date: Fri, 6 Mar 2020 10:18:56 +0100 Subject: Update tox setup Setuptools' 'setup.py test' command produces deprecation warning so removing it. Tox is performing sdist anyway so it's usage was superfluous anyway. Removing setup-template.py as it's not needed. Adding pytest in place of deprecated setuptools 'test' routine and some placeholder for tests. Change-Id: Ib03b1664286a0bd0425bf2aabe2dddf27fb01e8e Issue-ID: INT-1427 Signed-off-by: Bartek Grzybowski --- heatbridge/heatbridge/tests/test_default.py | 2 ++ heatbridge/setup-template.py | 10 ---------- heatbridge/setup.py | 4 ++-- heatbridge/test-requirements.txt | 1 + heatbridge/tox.ini | 7 ++----- 5 files changed, 7 insertions(+), 17 deletions(-) create mode 100644 heatbridge/heatbridge/tests/test_default.py delete mode 100644 heatbridge/setup-template.py diff --git a/heatbridge/heatbridge/tests/test_default.py b/heatbridge/heatbridge/tests/test_default.py new file mode 100644 index 0000000..3e3c27f --- /dev/null +++ b/heatbridge/heatbridge/tests/test_default.py @@ -0,0 +1,2 @@ +def test_default(): + pass diff --git a/heatbridge/setup-template.py b/heatbridge/setup-template.py deleted file mode 100644 index 00f2a17..0000000 --- a/heatbridge/setup-template.py +++ /dev/null @@ -1,10 +0,0 @@ -from setuptools import setup - -setup( - name='${PROJECT_NAME}', # This is the name of your PyPI-package. - version='${VERSION}', # Update the version number for new releases - description='Script to input heat stack information into aai', # Info about script - install_requires=['python-novaclient','python-cinderclient','python-glanceclient', 'os_client_config', 'python-neutronclient', 'python-heatclient'], # what we need - packages=['heatbridge'], # The name of your scipts package - package_dir={'heatbridge': 'heatbridge'} # The location of your scipts package -) \ No newline at end of file diff --git a/heatbridge/setup.py b/heatbridge/setup.py index 0917ae9..a898b2a 100644 --- a/heatbridge/setup.py +++ b/heatbridge/setup.py @@ -2,9 +2,9 @@ from setuptools import setup setup( name='heatbridge', # This is the name of your PyPI-package. - version='0.2', # Update the version number for new releases + version='0.2', # Update the version number for new releases description='Script to input heat stack information into aai', # Info about script install_requires=['python-novaclient','python-cinderclient','python-glanceclient', 'os_client_config', 'python-neutronclient', 'python-heatclient'], # what we need packages=['heatbridge'], # The name of your scipts package package_dir={'heatbridge': 'heatbridge'} # The location of your scipts package -) \ No newline at end of file +) diff --git a/heatbridge/test-requirements.txt b/heatbridge/test-requirements.txt index 1e76c7d..2b34d86 100644 --- a/heatbridge/test-requirements.txt +++ b/heatbridge/test-requirements.txt @@ -6,3 +6,4 @@ nose # LGPL flake8 # MIT pylint # GPLv2 more-itertools~=5.0.0 +pytest diff --git a/heatbridge/tox.ini b/heatbridge/tox.ini index bb7d455..9ff8ea3 100644 --- a/heatbridge/tox.ini +++ b/heatbridge/tox.ini @@ -4,7 +4,7 @@ # and then run "tox" from this directory. [tox] -envlist = py27,py3 +envlist = py27 modules = heatbridge @@ -20,12 +20,9 @@ changedir = {toxinidir} commands = flake8 --max-line-length 120 {[tox]modules} -[testenv:py3] -basepython = python3 - [testenv:py27] basepython = python2.7 -commands = {envpython} setup.py test +commands = pytest [testenv:pylint] basepython = python3 -- cgit 1.2.3-korg