1"""Assorted runtime unit tests
2"""
3from mako import runtime
4from mako.testing.assertions import eq_
5
6
7class ContextTest:
8    def test_locals_kwargs(self):
9        c = runtime.Context(None, foo="bar")
10        eq_(c.kwargs, {"foo": "bar"})
11
12        d = c._locals({"zig": "zag"})
13
14        # kwargs is the original args sent to the Context,
15        # it's intentionally kept separate from _data
16        eq_(c.kwargs, {"foo": "bar"})
17        eq_(d.kwargs, {"foo": "bar"})
18
19        eq_(d._data["zig"], "zag")
20