Beispiel #1
0
 def assert_is_owner(self, owner: str, owned: str):
     assert (
         owner
         == self.request_single_product(
             ExportedTarget, Params(OwnedDependency(self.tgt(owned)))
         ).target.address.reference()
     )
Beispiel #2
0
 def assert_error(self, owned: str, exc_cls: Type[Exception]):
     with pytest.raises(ExecutionError) as excinfo:
         self.request_single_product(
             ExportedTarget, Params(OwnedDependency(self.tgt(owned))))
     ex = excinfo.value
     assert len(ex.wrapped_exceptions) == 1
     assert type(ex.wrapped_exceptions[0]) == exc_cls
Beispiel #3
0
 def assert_error(self, owned: str, exc_cls: Type[Exception]):
     with pytest.raises(ExecutionError) as excinfo:
         self.request_product(
             ExportedTarget,
             [
                 OwnedDependency(self.tgt(owned)),
                 create_options_bootstrapper()
             ],
         )
     ex = excinfo.value
     assert len(ex.wrapped_exceptions) == 1
     assert type(ex.wrapped_exceptions[0]) == exc_cls
Beispiel #4
0
 def assert_is_owner(self, owner: str, owned: str):
     assert (owner == self.request_single_product(
         ExportedTarget,
         Params(OwnedDependency(self.tgt(owned)),
                create_options_bootstrapper()),
     ).target.address.spec)