def test_format_source_code(self):
        osfile = os.__file__.rstrip('c')
        nfl_os = (osfile, 136, 'makedirs') % '%s:%d(%s)'
        self.assertIn('makedirs', self.viewer.format_source_code(nfl_os))
        self.assertNotIn('makedirsXYZ', self.viewer.format_source_code(nfl_os))
        nfl_illegal = '%sc:136(makedirs)' % osfile
        self.assertIn(_('The file type are forbidden to access!'),
                      self.viewer.format_source_code(nfl_illegal))
        nfl_not_exist = '%s.py:136(makedirs)' % osfile
        expected_msg = _('Can not access the file %s.py.') % osfile
        self.assertIn(expected_msg,
                      self.viewer.format_source_code(nfl_not_exist))
dataset/ETHPy150Open openstack/swift/test/unit/common/middleware/test_xprofile.py/Test_html_viewer.test_format_source_code/swapped operands of `%`