Example #1
0
 def test_add_unresolved_dependency(self, final_state: State) -> None:
     """Test adding unresolved dependencies into a state."""
     # This is actually never done in the code (from final state to a non-final state), but
     # let's test turning the switch.
     assert final_state.is_final()
     final_state.add_unresolved_dependency(
         ("selinon", "1.0.0", "https://pypi.org/simple"))
     assert not final_state.is_final()
     final_state.unresolved_dependencies.pop("selinon")
     assert final_state.is_final()
Example #2
0
 def test_is_final(self, state: State, final_state: State) -> None:
     """Test checks for final states."""
     assert final_state.is_final()
     assert not state.is_final()
     state.unresolved_dependencies.pop("flask")
     assert state.is_final()