Skip to content

Commit 0ffa460

Browse files
committed
actions: Add Python 3.9
Have to skip a test in versions older than 3.9 Also removed a Python version check that does not apply any more #390
1 parent 11bded4 commit 0ffa460

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
runs-on: ubuntu-latest
77
strategy:
88
matrix:
9-
python-version: [ '3.6', '3.7', '3.8']
9+
python-version: [ '3.6', '3.7', '3.8', '3.9']
1010
steps:
1111
- uses: actions/checkout@v2
1212
- name: Setup python

examples/help/unflatten/expected.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
usage: flatten-tool unflatten [-h] -f {csv,ods,xlsx} [--xml] [--id-name ID_NAME]
2-
[-b BASE_JSON] [-m ROOT_LIST_PATH] [-e ENCODING]
1+
usage: flatten-tool unflatten [-h] -f {csv,ods,xlsx} [--xml]
2+
[--id-name ID_NAME] [-b BASE_JSON]
3+
[-m ROOT_LIST_PATH] [-e ENCODING]
34
[-o OUTPUT_NAME] [-c CELL_SOURCE_MAP]
45
[-a HEADING_SOURCE_MAP]
56
[--timezone-name TIMEZONE_NAME] [-r ROOT_ID]
@@ -9,7 +10,7 @@ usage: flatten-tool unflatten [-h] -f {csv,ods,xlsx} [--xml] [--id-name ID_NAME]
910
[--metatab-schema METATAB_SCHEMA]
1011
[--metatab-only]
1112
[--metatab-vertical-orientation]
12-
[--xml-schema [XML_SCHEMA [XML_SCHEMA ...]]]
13+
[--xml-schema [XML_SCHEMA ...]]
1314
[--default-configuration DEFAULT_CONFIGURATION]
1415
[--root-is-list] [--disable-local-refs]
1516
[--xml-comment XML_COMMENT]
@@ -64,7 +65,7 @@ optional arguments:
6465
--metatab-vertical-orientation
6566
Read metatab so that headings are in the first column
6667
and data is read vertically. Only for XLSX not CSV
67-
--xml-schema [XML_SCHEMA [XML_SCHEMA ...]]
68+
--xml-schema [XML_SCHEMA ...]
6869
Path to one or more XML schemas (used for sorting)
6970
--default-configuration DEFAULT_CONFIGURATION
7071
Comma separated list of default parsing commands for

flattentool/tests/test_docs.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ 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 "xlsx" in root and sys.version_info[:2] < (3, 4):
18+
if root == "examples/help/unflatten" and sys.version_info[:2] < (3, 9):
1919
continue
2020
if "cmd.txt" in filename:
2121
examples_in_docs_data.append((root, filename))
@@ -133,7 +133,11 @@ def test_example_in_doc(root, filename):
133133

134134

135135
def test_expected_number_of_examples_in_docs_data():
136-
assert len(examples_in_docs_data) == 61
136+
expected = 61
137+
# See _get_examples_in_docs_data()
138+
if sys.version_info[:2] < (3, 9):
139+
expected -= 1
140+
assert len(examples_in_docs_data) == expected
137141

138142

139143
def _simplify_warnings(lines):

0 commit comments

Comments
 (0)