)
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,
# 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",
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"
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(