Skip to content

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

Merged
garethgreenaway merged 2 commits into
saltstack:2019.2.1from
Ch3LL:pytest_5_changes
Jul 4, 2019
Merged

Pytest 5.0 contextmanager str: call value on ExceptionInfo objects#53680
garethgreenaway merged 2 commits into
saltstack:2019.2.1from
Ch3LL:pytest_5_changes

Conversation

@Ch3LL

@Ch3LL Ch3LL commented Jul 2, 2019

Copy link
Copy Markdown
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants