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

allow configuration of the subsystems to initialize in a test #7665

Conversation

Projects
None yet
2 participants
@cosmicexplorer
Copy link
Contributor

commented May 6, 2019

Problem

Some target types, such as PythonBinary, depend on subsystems which they access during initialization. To test instantiation of these targets, their subsystems need to be initialized. We already do this with the subsystems for the Target base class -- this just exposes that to test classes.

Solution

  • Introduce the TestBase.subsystems classproperty.
  • Add testing demonstrating its use.

Result

Tests which instantiate targets that require subsystems to be initialized can declare that with a classproperty.

cosmicexplorer added some commits May 4, 2019

@cosmicexplorer cosmicexplorer added this to the 1.16.x milestone May 6, 2019

@cosmicexplorer cosmicexplorer changed the title allow configuration of the target class subsystems to initialize in a test allow configuration of the subsystems to initialize in a test May 7, 2019

@stuhood

stuhood approved these changes May 7, 2019

@stuhood stuhood merged commit c26c0af into pantsbuild:master May 7, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.