def test_lexical_scoping(self):
        c = Context({})
        # first template test: use_macro with use_macro
            # test to look for conflicts between scopes,
            # defaults overriding non-defaults across scope,
            # and vice versa.
        t1 = Template(self.LOAD_MACROS + self.MACRO1_DEFINITION +
            self.MACRO2_DEFINITION + self.USE_MACRO1_WITH_ONE_DEFAULT +
            self.USE_MACRO2)
        self.assertEqual(t1.render(c),
            self.MACRO1_WITH_ONE_DEFAULT_RENDERED + self.MACRO2_RENDERED)
        # second template test
            # test use_macro with macro_block
        t2 = Template(self.LOAD_MACROS + self.MACRO1_DEFINITION +
            self.MACRO2_DEFINITION + self.USE_MACRO1_WITH_ONE_DEFAULT +
            self.MACRO2_BLOCK)
        self.assertEqual(t2.render(c),
            self.MACRO1_WITH_ONE_DEFAULT_RENDERED + self.MACRO2_RENDERED)
        # third template test
            # test macro_block with use_macro
        t3 = Template(self.LOAD_MACROS + self.MACRO1_DEFINITION +
            self.MACRO2_DEFINITION + self.MACRO1_BLOCK_WITH_ONE_DEFAULT +
            self.USE_MACRO2)
        self.assertEqual(t3.render(c),
            self.MACRO1_WITH_ONE_DEFAULT_RENDERED + self.MACRO2_RENDERED)
        # fourth template test
            # test macro_block with macro_block
        t4 = Template(self.LOAD_MACROS + self.MACRO1_DEFINITION +
            self.MACRO2_DEFINITION + self.MACRO1_BLOCK_WITH_ONE_DEFAULT +
            self.MACRO2_BLOCK)
        self.assertEqual(t4.render(c),
            self.MACRO1_WITH_ONE_DEFAULT_RENDERED + self.MACRO2_RENDERED)
        # test a different combination of macro useage
        t5 = Template(self.LOAD_MACROS + self.MACRO2_DEFINITION +
            self.MACRO1_DEFINITION + self.USE_MACRO1_WITH_NO_ARGS +
            self.USE_MACRO2)
        self.assertEqual(t5.render(c),
            self.MACRO1_WITH_NO_ARGS_RENDERED + self.MACRO2_RENDERED)
make sure that args and kwargs in macros are lexically
dataset/ETHPy150Open nalourie/django-macros/build/lib/macros/tests.py/MacrosTests.test_lexical_scoping