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

Remove pytest_run --options option. #7802

Closed
jsirois opened this issue May 26, 2019 · 2 comments
Closed

Remove pytest_run --options option. #7802

jsirois opened this issue May 26, 2019 · 2 comments

Comments

@jsirois
Copy link
Contributor

jsirois commented May 26, 2019

This is slated for removal in 1.19.0.dev2 and requires:

  • Remove the option:

    register('--options', type=list, fingerprint=True,
    help='Pass these options to pytest. You can also use pass-through args.')

  • Remove its use in production:

    if self.get_options().options:
    for opt in self.get_options().options:
    args.extend(safe_shlex_split(opt))

  • Remove its use in tests:

    def test_passthrough_added_after_options(self):
    with self.marking_tests() as (target, assert_test_run, assert_test_not_run):
    self.run_tests([target], '-m', 'purple or red', options=['-k', 'two'])
    assert_test_not_run('test_one')
    assert_test_run('test_two')
    assert_test_not_run('test_three')
    assert_test_not_run('test_four')
    assert_test_not_run('test_five')
    def test_options_shlexed(self):
    with self.marking_tests() as (target, assert_test_run, assert_test_not_run):
    self.run_tests([target], options=["-m 'purple or red'"])
    assert_test_not_run('test_one')
    assert_test_run('test_two')
    assert_test_not_run('test_three')
    assert_test_run('test_four')
    assert_test_not_run('test_five')

@RemiTorracinta
Copy link

Looks like at least some of this is done?

@jsirois
Copy link
Contributor Author

jsirois commented Sep 20, 2019

Yup! All done by @blorente in #8123.

@jsirois jsirois closed this as completed Sep 20, 2019
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

No branches or pull requests

2 participants