Beispiel #1
0
  def test_fingerprint_changing_options_scope(self):
    """The options_scope of the task and any of its subsystem_dependencies
    should affect the task fingerprint."""
    task_fp = self._synth_fp(scope='xxx')
    other_task_fp = self._synth_fp(scope='yyy')
    self.assertNotEqual(other_task_fp, task_fp)

    subsystem_deps_fp = self._synth_fp(scope='xxx', _deps=(SubsystemDependency(FakeSubsystem, GLOBAL_SCOPE),))
    self.assertNotEqual(subsystem_deps_fp, task_fp)

    scoped_subsystems_fp = self._synth_fp(scope='xxx', _deps=(SubsystemDependency(FakeSubsystem, 'xxx'),))
    self.assertNotEqual(scoped_subsystems_fp, subsystem_deps_fp)
Beispiel #2
0
    def scoped(cls, optionable, removal_version=None, removal_hint=None):
        """Returns a dependency on this subsystem, scoped to `optionable`.

        :param removal_version: An optional deprecation version for this scoped Subsystem dependency.
        :param removal_hint: An optional hint to accompany a deprecation removal_version.

        Return value is suitable for use in SubsystemClientMixin.subsystem_dependencies().
        """
        return SubsystemDependency(cls, optionable.options_scope, removal_version, removal_hint)
Beispiel #3
0
    def scoped(cls, optionable):
        """Returns a dependency on this subsystem, scoped to `optionable`.

    Return value is suitable for use in SubsystemClientMixin.subsystem_dependencies().
    """
        return SubsystemDependency(cls, optionable.options_scope)
Beispiel #4
0
 def subsystem_dependencies(cls):
     return (SubsystemDependency(Subsys1, 'goal1.task12'), )
Beispiel #5
0
 def subsystem_dependencies(cls):
     return (SubsystemDependency(Subsys1, 'subsys2'), )