示例#1
0
 def test_include(
     self, builder_context: PipelineBuilderContext, recommendation_type: RecommendationType, cuda_version: str
 ) -> None:
     """Test including this pipeline unit."""
     builder_context.decision_type = None
     builder_context.recommendation_type = recommendation_type
     builder_context.project.runtime_environment.cuda_version = cuda_version
     assert builder_context.is_adviser_pipeline()
     assert list(TensorFlowCUDASieve.should_include(builder_context)) != []
示例#2
0
 def test_no_include(
     self,
     builder_context: PipelineBuilderContext,
     recommendation_type: RecommendationType,
     decision_type: DecisionType,
     cuda_version: str,
 ) -> None:
     """Test not including this pipeline unit."""
     builder_context.decision_type = decision_type
     builder_context.recommendation_type = recommendation_type
     builder_context.project.runtime_environment.cuda_version = cuda_version
     assert builder_context.is_adviser_pipeline(
     ) or builder_context.is_dependency_monkey_pipeline()
     assert TensorFlowCUDASieve.should_include(builder_context) is None