This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal-sdk.git

commit 36887dc976f8e5fd60b55617dcb7325075a28fab
Author: Marcus Christie <[email protected]>
AuthorDate: Thu Dec 8 12:35:39 2022 -0500

    AIRAVATA-3529 Support Py 3.10, 3.11, and fix 3.6 support
---
 .gitignore                                     |  1 +
 README.md                                      |  6 ++++++
 airavata_django_portal_sdk/tests/test_views.py |  4 ++--
 requirements-dev.txt                           |  3 ++-
 requirements.txt                               |  6 ++++--
 tox.ini                                        | 18 ++++++++++++++++++
 6 files changed, 33 insertions(+), 5 deletions(-)

diff --git a/.gitignore b/.gitignore
index 9394fe2..ac71a32 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@ __pycache__
 .vscode
 db.sqlite3
 dist
+.tox
diff --git a/README.md b/README.md
index fe84354..8973617 100644
--- a/README.md
+++ b/README.md
@@ -70,6 +70,12 @@ or
 django-admin test --settings airavata_django_portal_sdk.tests.test_settings
 ```
 
+or use tox to run the tests in all supported Python environments
+
+```
+tox
+```
+
 ### Running flake8
 
 ```
diff --git a/airavata_django_portal_sdk/tests/test_views.py 
b/airavata_django_portal_sdk/tests/test_views.py
index 7472292..152c5ae 100644
--- a/airavata_django_portal_sdk/tests/test_views.py
+++ b/airavata_django_portal_sdk/tests/test_views.py
@@ -22,7 +22,7 @@ class DownloadDirTestCase(TestCase):
         response = views.download_dir(request)
 
         user_storage.listdir.assert_called_once()
-        self.assertEqual("", user_storage.listdir.call_args.args[1], "called 
with empty path")
+        self.assertEqual("", user_storage.listdir.call_args[0][1], "called 
with empty path")
 
         self.assertEqual("attachment; filename=home.zip", 
response['Content-Disposition'])
         self.assertEqual("application/zip", response['Content-Type'])
@@ -49,7 +49,7 @@ class DownloadDirTestCase(TestCase):
         response = views.download_dir(request)
 
         user_storage.listdir.assert_called_once()
-        self.assertEqual("", user_storage.listdir.call_args.args[1], "called 
with empty path")
+        self.assertEqual("", user_storage.listdir.call_args[0][1], "called 
with empty path")
 
         self.assertEqual("attachment; filename=home.zip", 
response['Content-Disposition'])
         self.assertEqual("application/zip", response['Content-Type'])
diff --git a/requirements-dev.txt b/requirements-dev.txt
index 7481b0e..823d46d 100644
--- a/requirements-dev.txt
+++ b/requirements-dev.txt
@@ -7,5 +7,6 @@ mkdocs==1.3.0
 mkautodoc==0.1.0
 pycodestyle==2.6.0
 Jinja2==3.0.3
-pytest==7.2.0
+pytest==7.0.1
 pytest-django==4.5.2
+tox==3.27.1
diff --git a/requirements.txt b/requirements.txt
index 68c83ed..0d24187 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -5,8 +5,10 @@ cryptography==38.0.4
 Django==3.2.16
 djangorestframework==3.11.2
 google-api-python-client==1.12.8
-grpcio-tools==1.48.2
-grpcio==1.48.2
+grpcio-tools==1.48.2 ; python_version < "3.7"
+grpcio-tools==1.51.1 ; python_version >= "3.7"
+grpcio==1.48.2 ; python_version < "3.7"
+grpcio==1.51.1 ; python_version >= "3.7"
 oauthlib==3.1.0
 paramiko==2.10.1
 pycparser==2.21
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 0000000..45e503d
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,18 @@
+# tox (https://tox.readthedocs.io/) is a tool for running tests
+# in multiple virtualenvs. This configuration file will run the
+# test suite on all supported python versions. To use it, "pip install tox"
+# and then run "tox" from this directory.
+
+[tox]
+envlist = py36, py37, py38, py39, py310, py311
+
+[testenv]
+deps =
+    py{3,36,37,38,39,310,311}: -rrequirements-dev.txt
+
+commands =
+    pytest airavata_django_portal_sdk/
+
+# see https://github.com/pytest-dev/pytest/issues/2042
+setenv =
+    PY_IGNORE_IMPORTMISMATCH = 1

Reply via email to