From: Jérôme Benoit Date: Wed, 24 Dec 2025 22:41:31 +0000 (+0100) Subject: test(ReforceXY): cleanup tests namespace X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=141eb15b0d6022685779b238f4e3bfd3e0edf601;p=freqai-strategies.git test(ReforceXY): cleanup tests namespace Signed-off-by: Jérôme Benoit --- diff --git a/ReforceXY/reward_space_analysis/tests/api/test_api_helpers.py b/ReforceXY/reward_space_analysis/tests/api/test_api_helpers.py index c50a678..e25e005 100644 --- a/ReforceXY/reward_space_analysis/tests/api/test_api_helpers.py +++ b/ReforceXY/reward_space_analysis/tests/api/test_api_helpers.py @@ -158,8 +158,8 @@ class TestAPIAndHelpers(RewardSpaceTestBase): ) self.assertTrue(((values >= 0.0) & (values <= 0.9)).all()) - def test_to_bool(self): - """Test _to_bool with various inputs.""" + def test_simulate_samples_interprets_bool_string_params(self): + """Test simulate_samples correctly interprets string boolean params like action_masking.""" df1 = simulate_samples_with_defaults( self.base_params(action_masking="true", max_trade_duration_candles=50), num_samples=10, diff --git a/ReforceXY/reward_space_analysis/tests/cli/test_cli_params_and_csv.py b/ReforceXY/reward_space_analysis/tests/cli/test_cli_params_and_csv.py index 750f479..d7099ae 100644 --- a/ReforceXY/reward_space_analysis/tests/cli/test_cli_params_and_csv.py +++ b/ReforceXY/reward_space_analysis/tests/cli/test_cli_params_and_csv.py @@ -145,8 +145,8 @@ class TestParamsPropagation(RewardSpaceTestBase): # Section numbering includes PBRS invariance line 7 self.assertIn("PBRS Invariance", content) - def test_strict_diagnostics_constant_distribution_raises(self): - """Run with --strict_diagnostics and very low num_samples to increase chance of constant columns; expect success but can parse diagnostics without fallback replacements.""" + def test_strict_diagnostics_constant_distribution_succeeds(self): + """Run with --strict_diagnostics and low num_samples; expect success, exercising assertion branches before graceful fallback paths.""" out_dir = self.output_path / "strict_diagnostics" cmd = [ "uv", @@ -173,8 +173,6 @@ class TestParamsPropagation(RewardSpaceTestBase): report_path = out_dir / "statistical_analysis.md" self.assertTrue(report_path.exists(), "Missing statistical_analysis.md") - """Integration tests to validate max_trade_duration_candles propagation via CLI params and dynamic flag.""" - def test_max_trade_duration_candles_propagation_params(self): """--params max_trade_duration_candles=X propagates to manifest and simulation params.""" out_dir = self.output_path / "mtd_params" diff --git a/ReforceXY/reward_space_analysis/tests/integration/test_report_formatting.py b/ReforceXY/reward_space_analysis/tests/integration/test_report_formatting.py index c2d4690..884311e 100644 --- a/ReforceXY/reward_space_analysis/tests/integration/test_report_formatting.py +++ b/ReforceXY/reward_space_analysis/tests/integration/test_report_formatting.py @@ -90,8 +90,6 @@ class TestReportFormatting(RewardSpaceTestBase): report_path = out_dir / "statistical_analysis.md" return report_path.read_text(encoding="utf-8") - """Tests for report formatting elements not covered elsewhere.""" - def test_abs_shaping_line_present_and_constant(self): """Abs Σ Shaping Reward line present, formatted, uses constant not literal.""" df = pd.DataFrame(