⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 macros.py

📁 trac是一款svn服务器的web客户端
💻 PY
字号:
import unittestimport trac.wiki.macrosfrom trac.wiki.tests import formatterIMAGE_MACRO_TEST_CASES=u"""============================== source: Image, no other arguments[[Image(source:test.png)]]------------------------------<p><a style="padding:0; border:none" href="/browser/test.png"><img src="/browser/test.png?format=raw" alt="source:test.png" title="source:test.png" /></a></p>------------------------------[[Image(...)]]============================== source: Image, nolink[[Image(source:test.png, nolink)]]------------------------------<p><img src="/browser/test.png?format=raw" alt="source:test.png" title="source:test.png" /></p>------------------------------============================== source: Image, normal args[[Image(source:test.png, align=left, title=Test)]]------------------------------<p><a style="padding:0; border:none" href="/browser/test.png"><img src="/browser/test.png?format=raw" alt="source:test.png" style="float:left" title="Test" /></a></p>------------------------------============================== source: Image, size arg[[Image(source:test.png, 30%)]]------------------------------<p><a style="padding:0; border:none" href="/browser/test.png"><img width="30%" alt="source:test.png" title="source:test.png" src="/browser/test.png?format=raw" /></a></p>------------------------------============================== source: Image, keyword alignment[[Image(source:test.png, right)]]------------------------------<p><a style="padding:0; border:none" href="/browser/test.png"><img src="/browser/test.png?format=raw" alt="source:test.png" style="float:right" title="source:test.png" /></a></p>------------------------------============================== http: Image, nolink[[Image(http://www.edgewall.com/gfx/shredder.png, nolink)]]------------------------------<p><img src="http://www.edgewall.com/gfx/shredder.png" alt="http://www.edgewall.com/gfx/shredder.png" title="http://www.edgewall.com/gfx/shredder.png" /></p>------------------------------"""def suite():    suite = unittest.TestSuite()    suite.addTest(formatter.suite(IMAGE_MACRO_TEST_CASES, file=__file__))    return suiteif __name__ == '__main__':    unittest.main(defaultTest='suite')

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -