GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — ColdWaters-DotModCampaignChecker/test_mission_events.py at main · DotModGroup/ColdWaters-DotModCampaignChecker Expand file tree/ Copy pathtest_mission_events.pyMore file actions 46 lines (37 loc) · 1.24 KB / Copy pathtest_mission_events.pyFile metadata and controls46 lines (37 loc) · 1.24 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 """This file contains tests for the win/loss events found in mission files. Imports From: campaign.py report.py Functions: test_mission_events() """ from campaign import Campaign from report import Report def test_mission_events(current_campaign: Campaign): """Test each mission to ensure the specified win/loss events exist Parameters: current_campaign: Campaign | The parsed campaign to be tested Returns: Report | The completed Report to be returned """ report = Report() for mission in current_campaign.missions: try: if ( win := mission.events["win"] ) not in current_campaign.language_info.events.events: report.errors.append( f'ERROR: Mission {mission.name} calls for missing win event "{win}".' ) except KeyError: continue try: if ( fail := mission.events["fail"] ) not in current_campaign.language_info.events.events: report.errors.append( f'ERROR: Mission {mission.name} calls for missing fail event "{fail}".' ) except KeyError: continue return report |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |