Buckets:
| """Tests for text observation mode (LLM-friendly output).""" | |
| from cropRL.config import EnvConfig | |
| from cropRL.models import CroprlAction | |
| from cropRL.server.cropRL_environment import CroprlEnvironment | |
| from cropRL.enums import ActionType | |
| class TestTextMode: | |
| def test_text_mode_off_no_summary(self, env): | |
| obs = env.step(CroprlAction(action_id=ActionType.WAIT)) | |
| assert obs.text_summary == "" | |
| def test_text_mode_on_has_summary(self): | |
| config = EnvConfig(text_mode=True) | |
| e = CroprlEnvironment(config=config) | |
| obs = e.reset(seed=42) | |
| assert obs.text_summary != "" | |
| assert "Farm Dashboard" in obs.text_summary | |
| def test_text_summary_contains_key_info(self): | |
| config = EnvConfig(text_mode=True) | |
| e = CroprlEnvironment(config=config) | |
| obs = e.reset(seed=42) | |
| assert "January" in obs.text_summary | |
| assert "Soil Nitrogen" in obs.text_summary | |
| assert "Cash" in obs.text_summary | |
| assert "Water Level" in obs.text_summary | |
| assert "Land Value" in obs.text_summary | |
Xet Storage Details
- Size:
- 1.07 kB
- Xet hash:
- 6dcad951b0e3321d09762300e94b2aac5617e1438c6523a5e7f401f3d5f74c46
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.