From 7fadea74165dc1d117587e0d16f934aa95d6447d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20R=C3=B6hrich?= Date: Tue, 28 Feb 2023 12:19:54 +0100 Subject: [PATCH] QoL: Fix tox.ini syntax and other minor things MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix tox.ini syntax Modern tox versions require the expected environment variables to be listed one by one on separate lines in tox.ini - Add `venv` to list of ignored names for git This is a common name for a local Python virtual environment. Less typing than `virtualenv` - Add `tox` to requirements.txt Installing `tox` via `pip` has the advantage of including it in the virtual environment, thus avoiding trouble on operating systems shipping by default with python3.6 or older. It's also nice that `pip install -r requirements.txt` is now sufficient to set up the testing environment, after initializing the virtual environment with a moder-enough python version. Signed-off-by: Moritz Röhrich (cherry picked from commit 3a0f1f0ead196c67721e94a19544aad19846f039) --- .gitignore | 1 + requirements.txt | 1 + tox.ini | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index bcbae80..2a246a8 100644 --- a/.gitignore +++ b/.gitignore @@ -10,5 +10,6 @@ /*.egg-info /virtualenv +/venv config.yaml diff --git a/requirements.txt b/requirements.txt index ac1d18f..7742d8f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,3 +12,4 @@ pytz >=2011k httplib2 lxml pytest +tox diff --git a/tox.ini b/tox.ini index 93fde38..e4a30e5 100644 --- a/tox.ini +++ b/tox.ini @@ -3,5 +3,7 @@ envlist = py [testenv] deps = -rrequirements.txt -passenv = S3TEST_CONF S3_USE_SIGV4 +passenv = + S3TEST_CONF + S3_USE_SIGV4 commands = pytest {posargs}