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

@Ch3LL Ch3LL 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

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.

None yet

4 participants