Skip to content

Commit

Permalink
update numpy typing to be compatible with v2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Limmen committed Jun 17, 2024
1 parent 25d2e4b commit 4f322e5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ def test_get_elk_managers_infos(
emulation_env_config.elk_config = elk_config
emulation_env_config.elk_config.container.docker_gw_bridge_ip = "172.17.0.1"
emulation_env_config.elk_config.elk_manager_port = 5601
emulation_env_config.execution_id = "test_execution_id"
emulation_env_config.execution_id = 1
emulation_env_config.name = "test_emulation"
logger = MagicMock(spec=logging.Logger)
active_ips = ["172.17.0.1"]
Expand All @@ -520,5 +520,5 @@ def test_get_elk_managers_infos(
)
assert result.ips == ["172.17.0.1"]
assert result.ports == [5601]
assert result.execution_id == "test_execution_id"
assert result.execution_id == 1
assert result.emulation_name == "test_emulation"
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def test_reset(self) -> None:
self.env.trace.attacker_observations = ["obs1", "obs2"]
self.env.trace.defender_observations = ["obs1", "obs2"]
initial_trace_count = len(self.env.traces)
AptGameState.reset = lambda self: None
AptGameState.reset = lambda self: None # type: ignore
initial_obs, info = self.env.reset(seed=10, soft=False, options=None)
assert len(self.env.traces) == initial_trace_count + 1
assert isinstance(self.env.trace, SimulationTrace)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def test_expected_cost(self) -> None:
:return: None
"""
C = [[10, 20, 30], [15, 25, 35]]
C = [[10.0, 20.0, 30.0], [15.0, 25.0, 35.0]]
b = [0.2, 0.5, 0.3]
S = [0, 1, 2]
a1 = 0
Expand Down

0 comments on commit 4f322e5

Please sign in to comment.