<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>pytest</title> <link rel="stylesheet" href="../_static/sphinxdoc.css" type="text/css" /> <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../', VERSION: '2.2.4.0', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </script> <script type="text/javascript" src="../_static/jquery.js"></script> <script type="text/javascript" src="../_static/underscore.js"></script> <script type="text/javascript" src="../_static/doctools.js"></script> <script type="text/javascript" src="../_static/translations.js"></script> <link rel="top" title="None" href="../index.html" /> <link rel="up" title="モジュールコード" href="index.html" /> </head> <body> <div class="related"> <h3>ナビゲーション</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../py-modindex.html" title="Pythonモジュール索引" >モジュール</a></li> <li><a href="../contents.html">pytest-2.2.4.0</a> »</li> <li><a href="index.html" accesskey="U">モジュールコード</a> »</li> </ul> </div> <div class="sphinxsidebar"> <div class="sphinxsidebarwrapper"> <div id="searchbox" style="display: none"> <h3>クイック検索</h3> <form class="search" action="../search.html" method="get"> <input type="text" name="q" /> <input type="submit" value="検索" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> <p class="searchtip" style="font-size: 90%"> モジュール、クラス、または関数名を入力してください </p> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body"> <h1>pytest のソースコード</h1><div class="highlight"><pre> <span class="sd">"""</span> <span class="sd">pytest: unit and functional testing with Python.</span> <span class="sd">"""</span> <span class="n">__all__</span> <span class="o">=</span> <span class="p">[</span><span class="s">'main'</span><span class="p">]</span> <span class="k">if</span> <span class="n">__name__</span> <span class="o">==</span> <span class="s">'__main__'</span><span class="p">:</span> <span class="c"># if run as a script or by 'python -m pytest'</span> <span class="c"># we trigger the below "else" condition by the following import</span> <span class="kn">import</span> <span class="nn">pytest</span> <span class="k">raise</span> <span class="ne">SystemExit</span><span class="p">(</span><span class="n">pytest</span><span class="o">.</span><span class="n">main</span><span class="p">())</span> <span class="k">else</span><span class="p">:</span> <span class="c"># we are simply imported</span> <span class="kn">from</span> <span class="nn">_pytest.core</span> <span class="kn">import</span> <span class="n">main</span><span class="p">,</span> <span class="n">UsageError</span><span class="p">,</span> <span class="n">_preloadplugins</span> <span class="kn">from</span> <span class="nn">_pytest</span> <span class="kn">import</span> <span class="n">core</span> <span class="k">as</span> <span class="n">cmdline</span> <span class="kn">from</span> <span class="nn">_pytest</span> <span class="kn">import</span> <span class="n">__version__</span> <span class="n">_preloadplugins</span><span class="p">()</span> <span class="c"># to populate pytest.* namespace so help(pytest) works</span> </pre></div> </div> </div> </div> <div class="clearer"></div> </div> <div class="related"> <h3>ナビゲーション</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../py-modindex.html" title="Pythonモジュール索引" >モジュール</a></li> <li><a href="../contents.html">pytest-2.2.4.0</a> »</li> <li><a href="index.html" >モジュールコード</a> »</li> </ul> </div> <div class="footer"> © Copyright 2011, holger krekel et alii. このドキュメントは <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3 で生成しました。 </div> </body> </html>