(self)
| 118 | ) |
| 119 | |
| 120 | def test_render_context(self): |
| 121 | test_context = RenderContext({"fruit": "papaya"}) |
| 122 | |
| 123 | # push() limits access to the topmost dict |
| 124 | test_context.push() |
| 125 | |
| 126 | test_context["vegetable"] = "artichoke" |
| 127 | self.assertEqual(list(test_context), ["vegetable"]) |
| 128 | |
| 129 | self.assertNotIn("fruit", test_context) |
| 130 | with self.assertRaises(KeyError): |
| 131 | test_context["fruit"] |
| 132 | self.assertIsNone(test_context.get("fruit")) |
| 133 | |
| 134 | def test_flatten_context(self): |
| 135 | a = Context() |
nothing calls this directly
no test coverage detected