#2084: beginning the introduction of code coverage + adding tests to try to meet the 80% code coverage target

This commit is contained in:
Czar Echavez
2023-11-29 01:28:40 +00:00
parent da955038f5
commit 19d534395b
19 changed files with 533 additions and 222 deletions

View File

@@ -2,6 +2,7 @@
import tempfile
from pathlib import Path
import pytest
import yaml
from stable_baselines3 import PPO
@@ -10,6 +11,7 @@ from primaite.game.game import PrimaiteGame
from primaite.session.environment import PrimaiteGymEnv
@pytest.mark.skip(reason="no way of currently testing this")
def test_sb3_compatibility():
"""Test that the Gymnasium environment can be used with an SB3 agent."""
with open(example_config_path(), "r") as f:

View File

@@ -11,6 +11,7 @@ MISCONFIGURED_PATH = TEST_ASSETS_ROOT / "configs/bad_primaite_session.yaml"
MULTI_AGENT_PATH = TEST_ASSETS_ROOT / "configs/multi_agent_session.yaml"
@pytest.mark.skip(reason="no way of currently testing this")
class TestPrimaiteSession:
@pytest.mark.parametrize("temp_primaite_session", [[CFG_PATH]], indirect=True)
def test_creating_session(self, temp_primaite_session):