(self)
| 7 | class TestLMTemplateParser(unittest.TestCase): |
| 8 | |
| 9 | def setUp(self): |
| 10 | self.parser = LMTemplateParser() |
| 11 | self.prompt = PromptList([ |
| 12 | { |
| 13 | 'section': 'begin', |
| 14 | 'pos': 'begin' |
| 15 | }, |
| 16 | 'begin', |
| 17 | { |
| 18 | 'role': 'SYSTEM', |
| 19 | 'fallback_role': 'HUMAN', |
| 20 | 'prompt': 'system msg' |
| 21 | }, |
| 22 | { |
| 23 | 'section': 'ice', |
| 24 | 'pos': 'begin' |
| 25 | }, |
| 26 | { |
| 27 | 'role': 'HUMAN', |
| 28 | 'prompt': 'U0' |
| 29 | }, |
| 30 | { |
| 31 | 'role': 'BOT', |
| 32 | 'prompt': 'B0' |
| 33 | }, |
| 34 | { |
| 35 | 'section': 'ice', |
| 36 | 'pos': 'end' |
| 37 | }, |
| 38 | { |
| 39 | 'section': 'begin', |
| 40 | 'pos': 'end' |
| 41 | }, |
| 42 | { |
| 43 | 'section': 'round', |
| 44 | 'pos': 'begin' |
| 45 | }, |
| 46 | { |
| 47 | 'role': 'HUMAN', |
| 48 | 'prompt': 'U1', |
| 49 | 'end': '\n' |
| 50 | }, |
| 51 | { |
| 52 | 'role': 'BOT', |
| 53 | 'prompt': 'B1' |
| 54 | }, |
| 55 | { |
| 56 | 'role': 'HUMAN', |
| 57 | 'prompt': 'U2' |
| 58 | }, |
| 59 | { |
| 60 | 'role': 'BOT', |
| 61 | 'prompt': 'B2' |
| 62 | }, |
| 63 | { |
| 64 | 'section': 'round', |
| 65 | 'pos': 'end' |
| 66 | }, |
nothing calls this directly
no test coverage detected