Skip to content

Commit 8fcfefa

Browse files
committed
Test only Python versions available on github's ubuntu 22.04
1 parent a044c32 commit 8fcfefa

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.github/workflows/python-package.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ jobs:
2323
LAB_OBO_PUBLIC_CLIENT_ID: ${{ secrets.LAB_OBO_PUBLIC_CLIENT_ID }}
2424

2525
# Derived from https://docs.github.com/en/actions/guides/building-and-testing-python#starting-with-the-python-workflow-template
26-
runs-on: ubuntu-latest
26+
runs-on: ubuntu-latest # It switched to 22.04 shortly after 2022-Nov-8
2727
strategy:
2828
matrix:
29-
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, "3.10", "3.11-dev"]
29+
python-version: [2.7, 3.7, 3.8, 3.9, "3.10", "3.11", "3.12-dev"]
3030

3131
steps:
3232
- uses: actions/checkout@v2

tests/test_authority.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ def test_lessknown_host_will_return_a_set_of_v1_endpoints(self):
5959
self.assertNotIn('v2.0', a.token_endpoint)
6060

6161
def test_unknown_host_wont_pass_instance_discovery(self):
62-
_assert = getattr(self, "assertRaisesRegex", self.assertRaisesRegexp) # Hack
62+
_assert = (
63+
# Was Regexp, added alias Regex in Py 3.2, and Regexp will be gone in Py 3.12
64+
getattr(self, "assertRaisesRegex", None) or
65+
getattr(self, "assertRaisesRegexp", None))
6366
with _assert(ValueError, "invalid_instance"):
6467
Authority('https://example.com/tenant_doesnt_matter_in_this_case',
6568
MinimalHttpClient())

0 commit comments

Comments
 (0)