Skip to content

Commit d09ee50

Browse files
authored
Merge pull request #408 from OpenDataServices/python310and311
python: Add 3.10 and 3.11
2 parents a57dc99 + 5f41024 commit d09ee50

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ubuntu-20.04
88
strategy:
99
matrix:
10-
python-version: [ '3.6', '3.7', '3.8', '3.9']
10+
python-version: [ '3.6', '3.7', '3.8', '3.9', '3.10', '3.11']
1111
jsonref-version: ["==0.3", ">1"]
1212
steps:
1313
- uses: actions/checkout@v2

examples/help/unflatten/expected.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ usage: flatten-tool unflatten [-h] -f {csv,ods,xlsx} [--xml]
1010
[--metatab-schema METATAB_SCHEMA]
1111
[--metatab-only]
1212
[--metatab-vertical-orientation]
13-
[--xml-schema [XML_SCHEMA ...]]
13+
[--xml-schema [XML_SCHEMA [XML_SCHEMA ...]]]
1414
[--default-configuration DEFAULT_CONFIGURATION]
1515
[--root-is-list] [--disable-local-refs]
1616
[--xml-comment XML_COMMENT]
@@ -65,7 +65,7 @@ optional arguments:
6565
--metatab-vertical-orientation
6666
Read metatab so that headings are in the first column
6767
and data is read vertically. Only for XLSX not CSV
68-
--xml-schema [XML_SCHEMA ...]
68+
--xml-schema [XML_SCHEMA [XML_SCHEMA ...]]
6969
Path to one or more XML schemas (used for sorting)
7070
--default-configuration DEFAULT_CONFIGURATION
7171
Comma separated list of default parsing commands for

flattentool/tests/test_docs.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ def _get_examples_in_docs_data():
1515
examples_in_docs_data = []
1616
for root, dirs, files in os.walk("examples"):
1717
for filename in files:
18-
if root == "examples/help/unflatten" and sys.version_info[:2] < (3, 9):
18+
if root.startswith("examples/help/") and sys.version_info[:2] != (3, 8):
19+
# Different versions of python produce differently formatted help output.
20+
# We only test in one version, Python 3.8.
21+
# (Same as we lint code with, so dev's can have one virtual env)
1922
continue
2023
if "cmd.txt" in filename:
2124
examples_in_docs_data.append((root, filename))
@@ -135,8 +138,9 @@ def test_example_in_doc(root, filename):
135138
def test_expected_number_of_examples_in_docs_data():
136139
expected = 61
137140
# See _get_examples_in_docs_data()
138-
if sys.version_info[:2] < (3, 9):
139-
expected -= 1
141+
if sys.version_info[:2] != (3, 8):
142+
expected -= 3
143+
# number of help tests
140144
assert len(examples_in_docs_data) == expected
141145

142146

requirements_dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
-e .[HTTP]
22
urllib3>=1.24.2
3-
pytest<5
3+
pytest
44
pytest-cov
55
coveralls
66
pytest-localserver

0 commit comments

Comments
 (0)