Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pytest 5.0 contextmanager str: call value on ExceptionInfo objects #53680

Merged
merged 2 commits into from Jul 4, 2019

Conversation

@Ch3LL
Copy link
Contributor

commented Jul 2, 2019

What does this PR do?

The tests:

unit.modules.test_localemod.LocalemodTestCase.test_gen_locale_suse_localedef_error_handling
unit.modules.test_localemod.LocalemodTestCase.test_get_locale_with_no_systemd_unknown
unit.modules.test_localemod.LocalemodTestCase.test_localectl_status_parser_broken
unit.modules.test_localemod.LocalemodTestCase.test_localectl_status_parser_empty
unit.modules.test_localemod.LocalemodTestCase.test_localectl_status_parser_no_systemd
unit.modules.test_localemod.LocalemodTestCase.test_set_locale_with_no_systemd_debian_no_update_locale
unit.modules.test_localemod.LocalemodTestCase.test_set_locale_with_no_systemd_unknown
unit.modules.test_file.FilemodLineTests.test_line_insert_ensure_beforeafter_rangelines
unit.modules.test_file.FilemodLineTests.test_line_insert_no_location_no_before_no_after
unit.modules.test_file.FilemodLineTests.test_line_modecheck_failure

are failing on mac osx because it is installing pytest 5.0.0.

This is due to the removal of __str__ here pytest-dev/pytest#5413

Updated the tests to call .value also see comment here: pytest-dev/pytest#5528 (comment)

What issues does this PR fix or reference?

Previous Behavior

tests failing:

unit.modules.test_localemod.LocalemodTestCase.test_gen_locale_suse_localedef_error_handling
unit.modules.test_localemod.LocalemodTestCase.test_get_locale_with_no_systemd_unknown
unit.modules.test_localemod.LocalemodTestCase.test_localectl_status_parser_broken
unit.modules.test_localemod.LocalemodTestCase.test_localectl_status_parser_empty
unit.modules.test_localemod.LocalemodTestCase.test_localectl_status_parser_no_systemd
unit.modules.test_localemod.LocalemodTestCase.test_set_locale_with_no_systemd_debian_no_update_locale
unit.modules.test_localemod.LocalemodTestCase.test_set_locale_with_no_systemd_unknown
unit.modules.test_file.FilemodLineTests.test_line_insert_ensure_beforeafter_rangelines
unit.modules.test_file.FilemodLineTests.test_line_insert_no_location_no_before_no_after
unit.modules.test_file.FilemodLineTests.test_line_modecheck_failure

New Behavior

test pass on pytest <=5.0.0

Tests written?

No -fixes test

Commits signed with GPG?

Yes

@dwoz
dwoz approved these changes Jul 2, 2019
@garethgreenaway garethgreenaway merged commit f5c5da4 into saltstack:2019.2.1 Jul 4, 2019
40 checks passed
40 checks passed
WIP Ready for review
Details
ci/docs (ignore-me-new-jenkins) This commit looks good
Details
ci/lint (ignore-me-new-jenkins) This commit looks good
Details
ci/py2/amazon2 (ignore-me-new-jenkins) This commit looks good
Details
ci/py2/centos6 (ignore-me-new-jenkins) This commit looks good
Details
ci/py2/centos7 (ignore-me-new-jenkins) This commit looks good
Details
ci/py2/debian8 (ignore-me-new-jenkins) This commit looks good
Details
ci/py2/debian9 (ignore-me-new-jenkins) This commit looks good
Details
ci/py2/fedora29 (ignore-me-new-jenkins) This commit looks good
Details
ci/py2/ubuntu1604 (ignore-me-new-jenkins) This commit looks good
Details
ci/py2/ubuntu1804 (ignore-me-new-jenkins) This commit looks good
Details
ci/py2/windows2016 (ignore-me-new-jenkins) This commit looks good
Details
ci/py3/amazon2 (ignore-me-new-jenkins) This commit looks good
Details
ci/py3/centos7 (ignore-me-new-jenkins) This commit looks good
Details
ci/py3/debian8 (ignore-me-new-jenkins) This commit looks good
Details
ci/py3/debian9 (ignore-me-new-jenkins) This commit looks good
Details
ci/py3/fedora29 (ignore-me-new-jenkins) This commit looks good
Details
ci/py3/ubuntu1604 (ignore-me-new-jenkins) This commit looks good
Details
ci/py3/ubuntu1804 (ignore-me-new-jenkins) This commit looks good
Details
ci/py3/windows2016 (ignore-me-new-jenkins) This commit looks good
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
jenkins/pr/docs The docs job has passed
Details
jenkins/pr/lint The lint test passed
Details
jenkins/pr/py2-amazon-2 The py2-amazon-2 job has passed
Details
jenkins/pr/py2-centos-6 The py2-centos-6 job has passed
Details
jenkins/pr/py2-centos-7 The py2-centos-7 job has passed
Details
jenkins/pr/py2-debian-8 The py2-debian-8 job has passed
Details
jenkins/pr/py2-debian-9 The py2-debian-9 job has passed
Details
jenkins/pr/py2-fedora-29 The py2-fedora-29 job has passed
Details
jenkins/pr/py2-ubuntu-1604 The py2-ubuntu-1604 job has passed
Details
jenkins/pr/py2-ubuntu-1804 The py2-ubuntu-1804 job has passed
Details
jenkins/pr/py2-windows-2016 The py2-windows-2016 job has passed
Details
jenkins/pr/py3-amazon-2 The py3-amazon-2 job has passed
Details
jenkins/pr/py3-centos-7 The py3-centos-7 job has passed
Details
jenkins/pr/py3-debian-8 The py3-debian-8 job has passed
Details
jenkins/pr/py3-debian-9 The py3-debian-9 job has passed
Details
jenkins/pr/py3-fedora-29 The py3-fedora-29 job has passed
Details
jenkins/pr/py3-ubuntu-1604 The py3-ubuntu-1604 job has passed
Details
jenkins/pr/py3-ubuntu-1804 The py3-ubuntu-1804 job has passed
Details
jenkins/pr/py3-windows-2016 The py3-windows-2016 job has passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.