def test_constructor(self) -> None: e = Environment() assert e.to_dict() == {} e["key"] = 0 e["key2"] = 1 e.mark_as_supervision("key2") assert e["key"] == 0 with pytest.raises(AssertionError): e["key3"] assert e.to_dict() == {"key": 0, "key2": 1}
def test_clone_without_supervision(self) -> None: e = Environment() e["key"] = 0 e.mark_as_supervision("key") e2 = e.clone_without_supervision() assert e2.to_dict() == {}
def test_mark_as_supervision(self) -> None: with pytest.raises(AssertionError): e = Environment() e.mark_as_supervision("key2")