From a667678394c7943779e3f10bbb9098d52b433698 Mon Sep 17 00:00:00 2001 From: Russell Hay Date: Fri, 14 Apr 2017 15:20:38 -0700 Subject: [PATCH 1/3] initial infrastructure for smoke tests --- .gitignore | 3 ++- setup.cfg | 6 ++++++ setup.py | 6 +++++- smoke/__init__.py | 0 4 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 smoke/__init__.py diff --git a/.gitignore b/.gitignore index 3b7a9ab5a..8b9cc54a0 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ __pycache__/ *.py[cod] *$py.class +test.junit.xml # C extensions *.so @@ -145,4 +146,4 @@ $RECYCLE.BIN/ # Documentation docs/_site/ -docs/.jekyll-metadata \ No newline at end of file +docs/.jekyll-metadata diff --git a/setup.cfg b/setup.cfg index c3c4b578b..6136b814a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -20,3 +20,9 @@ versionfile_build = tableauserverclient/_version.py tag_prefix = v #parentdir_prefix = +[aliases] +smoke=pytest + +[tool:pytest] +testpaths = test smoke +addopts = --junitxml=./test.junit.xml diff --git a/setup.py b/setup.py index fc9933d3a..ada6c8293 100644 --- a/setup.py +++ b/setup.py @@ -16,10 +16,14 @@ license='MIT', description='A Python module for working with the Tableau Server REST API.', test_suite='test', + setup_requires=[ + 'pytest-runner>=2.11,<3.0' + ], install_requires=[ 'requests>=2.11,<2.12.0a0' ], tests_require=[ - 'requests-mock>=1.0,<1.1a0' + 'requests-mock>=1.0,<1.1a0', + 'pytest>=3.0,<4' ] ) diff --git a/smoke/__init__.py b/smoke/__init__.py new file mode 100644 index 000000000..e69de29bb From 2d1faed46973132c2cdcff8bb97b6fe2844cdcbd Mon Sep 17 00:00:00 2001 From: Russell Hay Date: Fri, 14 Apr 2017 15:32:05 -0700 Subject: [PATCH 2/3] trying to fix travis errors by not pinning the version --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index ada6c8293..25f1209fe 100644 --- a/setup.py +++ b/setup.py @@ -17,13 +17,13 @@ description='A Python module for working with the Tableau Server REST API.', test_suite='test', setup_requires=[ - 'pytest-runner>=2.11,<3.0' + 'pytest-runner' ], install_requires=[ 'requests>=2.11,<2.12.0a0' ], tests_require=[ 'requests-mock>=1.0,<1.1a0', - 'pytest>=3.0,<4' + 'pytest' ] ) From 1ad921be8a32d4e0cb41d2648803f65ad6268ca3 Mon Sep 17 00:00:00 2001 From: Russell Hay Date: Mon, 17 Apr 2017 08:30:25 -0700 Subject: [PATCH 3/3] fix pinning to major version, not minor --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 25f1209fe..2c8718d5d 100644 --- a/setup.py +++ b/setup.py @@ -20,10 +20,10 @@ 'pytest-runner' ], install_requires=[ - 'requests>=2.11,<2.12.0a0' + 'requests>=2.11,<3.0' ], tests_require=[ - 'requests-mock>=1.0,<1.1a0', + 'requests-mock>=1.0,<2.0', 'pytest' ] )