def test_current_page(self):
        """
        Test that the if_current_page tag works.
        """
        page = 'page1.html'
        content = page % "{%% if_current_page '/%s' %%}"

        other = 'page2.html'

        with open(os.path.join(self.path, 'pages', page), 'w') as f:
            f.write(content)

        with open(os.path.join(self.path, 'pages', other), 'w') as f:
            f.write(content)

        self.site.build()

        with open(os.path.join(self.path, '.build', page), 'rU') as f:
            self.assertEqual('True', f.read())

        with open(os.path.join(self.path, '.build', other), 'rU') as f:
            self.assertEqual('False', f.read())
dataset/ETHPy150Open koenbok/Cactus/cactus/tests/test_basic.py/TestSite.test_current_page/swapped operands of `%`