Another scoped option issue in test

Review Request #2870 - Created Sept. 23, 2015 and submitted

Information
Peiyu Wang
pants
2250
cfeb85a...
Reviewers
pants-reviews
benjyw

This is another scoped option related issue, besides the ones fixed by
https://rbcommons.com/s/twitter/r/2850/ . The failure is in test_noqa.py, it is
still due to scoped_option used isn't initialized, but the underlying reason
is different.

TaskTestBase provides a way to override task_type and use it along with its
option_scope to construct a testing_task_type. Note this option_scope is always
a fixed value test_scope. The subsequent context call construct scoped
options using test_scope.

https://github.com/pantsbuild/pants/pull/2250 has a example call with more details.

From user perspective, for task_type and options_scope to be really
overridable, two things need to happen

  • override option_scope earlier, placing it in child test setUp is too late
  • actually use the overridden option_scope for test_task_type.options_scope so
    it is not a fix value

https://travis-ci.org/pantsbuild/pants/builds/81723835

Issues

  • 0
  • 4
  • 0
  • 4
Description From Last Updated
Benjy Weinberger
Peiyu Wang
Benjy Weinberger
Peiyu Wang
Benjy Weinberger
Peiyu Wang
Review request changed

Status: Closed (submitted)

Change Summary:

Merged as 4587946bf7f0c6491fac37f2cc386e3d0647b25d

Loading...