| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244 |
- <!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="X-UA-Compatible" content="IE=Edge" />
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>test.generic.test_io module — Python(P)DEVS-BBL documentation</title>
- <link rel="stylesheet" href="_static/nature.css" type="text/css" />
- <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
- <link rel="stylesheet" type="text/css" href="_static/custom.css" />
- <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></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/language_data.js"></script>
- <script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
- <link rel="index" title="Index" href="genindex.html" />
- <link rel="search" title="Search" href="search.html" />
- <link rel="next" title="test.generic.test_math module" href="test.generic.test_math.html" />
- <link rel="prev" title="test.generic.test_generators module" href="test.generic.test_generators.html" />
- </head><body>
- <div class="related" role="navigation" aria-label="related navigation">
- <h3>Navigation</h3>
- <ul>
- <li class="right" style="margin-right: 10px">
- <a href="genindex.html" title="General Index"
- accesskey="I">index</a></li>
- <li class="right" >
- <a href="py-modindex.html" title="Python Module Index"
- >modules</a> |</li>
- <li class="right" >
- <a href="test.generic.test_math.html" title="test.generic.test_math module"
- accesskey="N">next</a> |</li>
- <li class="right" >
- <a href="test.generic.test_generators.html" title="test.generic.test_generators module"
- accesskey="P">previous</a> |</li>
- <li class="nav-item nav-item-0"><a href="index.html">Python(P)DEVS-BBL documentation</a> »</li>
- <li class="nav-item nav-item-1"><a href="test.html" >test package</a> »</li>
- <li class="nav-item nav-item-2"><a href="test.generic.html" accesskey="U">test.generic package</a> »</li>
- </ul>
- </div>
- <div class="document">
- <div class="documentwrapper">
- <div class="bodywrapper">
- <div class="body" role="main">
-
- <div class="section" id="module-test.generic.test_io">
- <span id="test-generic-test-io-module"></span><h1>test.generic.test_io module<a class="headerlink" href="#module-test.generic.test_io" title="Permalink to this headline">¶</a></h1>
- <p>Tests the Input/Output building blocks to prove validity w.r.t. these tests.</p>
- <div class="admonition note">
- <p class="first admonition-title">Note</p>
- <p class="last">The <code class="xref py py-class docutils literal notranslate"><span class="pre">pypdevsbbl.generic.io.Sound</span></code> block cannot be tested in a unit test,
- but it has been checked that the sounds will be played. To test this yourself,
- execute the <a class="reference internal" href="pypdevsbbl.generic.io.html#module-pypdevsbbl.generic.io" title="pypdevsbbl.generic.io"><code class="xref py py-mod docutils literal notranslate"><span class="pre">pypdevsbbl.generic.io</span></code></a> module.</p>
- </div>
- <div class="admonition seealso">
- <p class="first admonition-title">See also</p>
- <p class="last"><a class="reference internal" href="pypdevsbbl.generic.io.html#module-pypdevsbbl.generic.io" title="pypdevsbbl.generic.io"><code class="xref py py-mod docutils literal notranslate"><span class="pre">pypdevsbbl.generic.io</span></code></a></p>
- </div>
- <dl class="class">
- <dt id="test.generic.test_io.StubLogger">
- <em class="property">class </em><code class="descclassname">test.generic.test_io.</code><code class="descname">StubLogger</code><a class="reference internal" href="_modules/test/generic/test_io.html#StubLogger"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#test.generic.test_io.StubLogger" title="Permalink to this definition">¶</a></dt>
- <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
- <p>Helper class to <em>cheat</em> the usage of an actual logger.</p>
- <dl class="method">
- <dt id="test.generic.test_io.StubLogger.debug">
- <code class="descname">debug</code><span class="sig-paren">(</span><em>msg</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/test/generic/test_io.html#StubLogger.debug"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#test.generic.test_io.StubLogger.debug" title="Permalink to this definition">¶</a></dt>
- <dd></dd></dl>
- <dl class="method">
- <dt id="test.generic.test_io.StubLogger.info">
- <code class="descname">info</code><span class="sig-paren">(</span><em>msg</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/test/generic/test_io.html#StubLogger.info"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#test.generic.test_io.StubLogger.info" title="Permalink to this definition">¶</a></dt>
- <dd></dd></dl>
- <dl class="method">
- <dt id="test.generic.test_io.StubLogger.notice">
- <code class="descname">notice</code><span class="sig-paren">(</span><em>msg</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/test/generic/test_io.html#StubLogger.notice"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#test.generic.test_io.StubLogger.notice" title="Permalink to this definition">¶</a></dt>
- <dd></dd></dl>
- <dl class="method">
- <dt id="test.generic.test_io.StubLogger.warn">
- <code class="descname">warn</code><span class="sig-paren">(</span><em>msg</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/test/generic/test_io.html#StubLogger.warn"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#test.generic.test_io.StubLogger.warn" title="Permalink to this definition">¶</a></dt>
- <dd></dd></dl>
- <dl class="method">
- <dt id="test.generic.test_io.StubLogger.error">
- <code class="descname">error</code><span class="sig-paren">(</span><em>msg</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/test/generic/test_io.html#StubLogger.error"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#test.generic.test_io.StubLogger.error" title="Permalink to this definition">¶</a></dt>
- <dd></dd></dl>
- <dl class="method">
- <dt id="test.generic.test_io.StubLogger.critical">
- <code class="descname">critical</code><span class="sig-paren">(</span><em>msg</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/test/generic/test_io.html#StubLogger.critical"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#test.generic.test_io.StubLogger.critical" title="Permalink to this definition">¶</a></dt>
- <dd></dd></dl>
- <dl class="method">
- <dt id="test.generic.test_io.StubLogger.alert">
- <code class="descname">alert</code><span class="sig-paren">(</span><em>msg</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/test/generic/test_io.html#StubLogger.alert"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#test.generic.test_io.StubLogger.alert" title="Permalink to this definition">¶</a></dt>
- <dd></dd></dl>
- <dl class="method">
- <dt id="test.generic.test_io.StubLogger.emerg">
- <code class="descname">emerg</code><span class="sig-paren">(</span><em>msg</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/test/generic/test_io.html#StubLogger.emerg"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#test.generic.test_io.StubLogger.emerg" title="Permalink to this definition">¶</a></dt>
- <dd></dd></dl>
- </dd></dl>
- <dl class="class">
- <dt id="test.generic.test_io.IOModel">
- <em class="property">class </em><code class="descclassname">test.generic.test_io.</code><code class="descname">IOModel</code><span class="sig-paren">(</span><em>table</em>, <em>block</em>, <em>inp</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/test/generic/test_io.html#IOModel"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#test.generic.test_io.IOModel" title="Permalink to this definition">¶</a></dt>
- <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">pypdevs.DEVS.CoupledDEVS</span></code></p>
- <p>Simple model constructor for the tests.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
- <li><strong>table</strong> (<em>list</em>) – A list with all events that should happen.</li>
- <li><strong>block</strong> – The block to connect to the
- <a class="reference internal" href="pypdevsbbl.generic.generators.html#pypdevsbbl.generic.generators.TableGenerator" title="pypdevsbbl.generic.generators.TableGenerator"><code class="xref py py-class docutils literal notranslate"><span class="pre">pypdevsbbl.generic.generators.TableGenerator</span></code></a>.</li>
- <li><strong>inp</strong> – The input port to connect the generator on.</li>
- </ul>
- </td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
- <dl class="function">
- <dt id="test.generic.test_io.simulate">
- <code class="descclassname">test.generic.test_io.</code><code class="descname">simulate</code><span class="sig-paren">(</span><em>table</em>, <em>block</em>, <em>inp</em>, <em>tt=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/test/generic/test_io.html#simulate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#test.generic.test_io.simulate" title="Permalink to this definition">¶</a></dt>
- <dd><p>Simulates the model.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
- <li><strong>table</strong> (<em>list</em>) – A list with all events that should happen.</li>
- <li><strong>block</strong> – The block to connect to the
- <a class="reference internal" href="pypdevsbbl.generic.generators.html#pypdevsbbl.generic.generators.TableGenerator" title="pypdevsbbl.generic.generators.TableGenerator"><code class="xref py py-class docutils literal notranslate"><span class="pre">pypdevsbbl.generic.generators.TableGenerator</span></code></a>.</li>
- <li><strong>inp</strong> – The input port to connect the generator on.</li>
- <li><strong>tt</strong> (<em>numeric</em>) – The termination time or <code class="docutils literal notranslate"><span class="pre">None</span></code> if
- no termination time needs to be set.
- Defaults to <code class="docutils literal notranslate"><span class="pre">None</span></code>.</li>
- </ul>
- </td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
- <dl class="class">
- <dt id="test.generic.test_io.TestIO">
- <em class="property">class </em><code class="descclassname">test.generic.test_io.</code><code class="descname">TestIO</code><span class="sig-paren">(</span><em>methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/test/generic/test_io.html#TestIO"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#test.generic.test_io.TestIO" title="Permalink to this definition">¶</a></dt>
- <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">unittest.case.TestCase</span></code></p>
- <dl class="method">
- <dt id="test.generic.test_io.TestIO.setUp">
- <code class="descname">setUp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/test/generic/test_io.html#TestIO.setUp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#test.generic.test_io.TestIO.setUp" title="Permalink to this definition">¶</a></dt>
- <dd></dd></dl>
- <dl class="method">
- <dt id="test.generic.test_io.TestIO.test_logger">
- <code class="descname">test_logger</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/test/generic/test_io.html#TestIO.test_logger"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#test.generic.test_io.TestIO.test_logger" title="Permalink to this definition">¶</a></dt>
- <dd><p>Tests the <a class="reference internal" href="pypdevsbbl.generic.io.html#pypdevsbbl.generic.io.Logger" title="pypdevsbbl.generic.io.Logger"><code class="xref py py-class docutils literal notranslate"><span class="pre">pypdevsbbl.generic.io.Logger</span></code></a> and all its subclasses.</p>
- </dd></dl>
- <dl class="method">
- <dt id="test.generic.test_io.TestIO.test_file_writer">
- <code class="descname">test_file_writer</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/test/generic/test_io.html#TestIO.test_file_writer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#test.generic.test_io.TestIO.test_file_writer" title="Permalink to this definition">¶</a></dt>
- <dd><p>Tests the <a class="reference internal" href="pypdevsbbl.generic.io.html#pypdevsbbl.generic.io.FileWriter" title="pypdevsbbl.generic.io.FileWriter"><code class="xref py py-class docutils literal notranslate"><span class="pre">pypdevsbbl.generic.io.FileWriter</span></code></a>.</p>
- </dd></dl>
- <dl class="method">
- <dt id="test.generic.test_io.TestIO.test_file_reader">
- <code class="descname">test_file_reader</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/test/generic/test_io.html#TestIO.test_file_reader"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#test.generic.test_io.TestIO.test_file_reader" title="Permalink to this definition">¶</a></dt>
- <dd><p>Tests the <a class="reference internal" href="pypdevsbbl.generic.io.html#pypdevsbbl.generic.io.FileReader" title="pypdevsbbl.generic.io.FileReader"><code class="xref py py-class docutils literal notranslate"><span class="pre">pypdevsbbl.generic.io.FileReader</span></code></a>.</p>
- </dd></dl>
- <dl class="method">
- <dt id="test.generic.test_io.TestIO.test_listener">
- <code class="descname">test_listener</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/test/generic/test_io.html#TestIO.test_listener"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#test.generic.test_io.TestIO.test_listener" title="Permalink to this definition">¶</a></dt>
- <dd><p>Tests the <a class="reference internal" href="pypdevsbbl.generic.io.html#pypdevsbbl.generic.io.Listener" title="pypdevsbbl.generic.io.Listener"><code class="xref py py-class docutils literal notranslate"><span class="pre">pypdevsbbl.generic.io.Listener</span></code></a>.</p>
- </dd></dl>
- </dd></dl>
- </div>
- </div>
- </div>
- </div>
- <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
- <div class="sphinxsidebarwrapper">
- <h4>Previous topic</h4>
- <p class="topless"><a href="test.generic.test_generators.html"
- title="previous chapter">test.generic.test_generators module</a></p>
- <h4>Next topic</h4>
- <p class="topless"><a href="test.generic.test_math.html"
- title="next chapter">test.generic.test_math module</a></p>
- <div id="searchbox" style="display: none" role="search">
- <h3>Quick search</h3>
- <div class="searchformwrapper">
- <form class="search" action="search.html" method="get">
- <input type="text" name="q" />
- <input type="submit" value="Go" />
- <input type="hidden" name="check_keywords" value="yes" />
- <input type="hidden" name="area" value="default" />
- </form>
- </div>
- </div>
- <script type="text/javascript">$('#searchbox').show(0);</script>
- </div>
- </div>
- <div class="clearer"></div>
- </div>
- <div class="related" role="navigation" aria-label="related navigation">
- <h3>Navigation</h3>
- <ul>
- <li class="right" style="margin-right: 10px">
- <a href="genindex.html" title="General Index"
- >index</a></li>
- <li class="right" >
- <a href="py-modindex.html" title="Python Module Index"
- >modules</a> |</li>
- <li class="right" >
- <a href="test.generic.test_math.html" title="test.generic.test_math module"
- >next</a> |</li>
- <li class="right" >
- <a href="test.generic.test_generators.html" title="test.generic.test_generators module"
- >previous</a> |</li>
- <li class="nav-item nav-item-0"><a href="index.html">Python(P)DEVS-BBL documentation</a> »</li>
- <li class="nav-item nav-item-1"><a href="test.html" >test package</a> »</li>
- <li class="nav-item nav-item-2"><a href="test.generic.html" >test.generic package</a> »</li>
- </ul>
- </div>
- <div class="footer" role="contentinfo">
- © Copyright 2020, Randy Paredis.
- Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.8.5.
- </div>
- </body>
- </html>
|