Skip to content

Commit

Permalink
Add Python 3.7 to CI unit test matrix. (ansible#34680)
Browse files Browse the repository at this point in the history
* Add Python 3.7 to CI unit test matrix.
* Fix `os.errno` reference to be `errno`.
* Update test_aci unit test for Python 3.7.
  • Loading branch information
mattclay authored Jan 10, 2018
1 parent f2037bb commit 30093dc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions shippable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ matrix:
- env: T=units/2.7
- env: T=units/3.5
- env: T=units/3.6
- env: T=units/3.7

- env: T=windows/1
- env: T=windows/2
Expand Down
2 changes: 2 additions & 0 deletions test/units/module_utils/network/aci/test_aci.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,8 @@ def test_empty_response(self):
error_text = to_native(u"Unable to parse output as XML, see 'raw' output. None (line 0)", errors='surrogate_or_strict')
elif PY2:
error_text = "Unable to parse output as XML, see 'raw' output. Document is empty, line 1, column 1 (line 1)"
elif sys.version_info >= (3, 7):
error_text = to_native(u"Unable to parse output as XML, see 'raw' output. None (line 0)", errors='surrogate_or_strict')
else:
error_text = "Unable to parse output as XML, see 'raw' output. Document is empty, line 1, column 1 (<string>, line 1)"

Expand Down
3 changes: 2 additions & 1 deletion test/units/modules/cloud/amazon/placebo_fixtures.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import errno
import os
import time
import mock
Expand Down Expand Up @@ -64,7 +65,7 @@ def placeboify(request, monkeypatch):
# make sure the directory for placebo test recordings is available
os.makedirs(recordings_path)
except OSError as e:
if e.errno != os.errno.EEXIST:
if e.errno != errno.EEXIST:
raise

pill = placebo.attach(session, data_path=recordings_path)
Expand Down

0 comments on commit 30093dc

Please sign in to comment.