Changeset 114f6db9


Ignore:
Timestamp:
10/15/2022 09:48:33 PM (19 months ago)
Author:
Pierre Labastie <pierre.labastie@…>
Branches:
11.3, 12.0, 12.1, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, lazarus, lxqt, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, trunk, xry111/llvm18, xry111/xf86-video-removal
Children:
ef6402e
Parents:
7775697
Message:

Add tests for some python modules

Location:
general/prog
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • general/prog/python-dependencies/Babel.xml

    r7775697 r114f6db9  
    7474      </para>
    7575
     76      <bridgehead renderas="sect5">Optional (for testing)</bridgehead>
     77      <para role="optional">
     78        <xref linkend="pytest"/>,
     79        <ulink url="https://pypi.org/project/freezegun/">freezegun</ulink>==0.3.12, and
     80        <ulink url="https://pypi.org/project/pytest-cov/">pytest-cov</ulink>
     81      </para>
     82
    7683    </sect3>
    7784
     
    9198
    9299<screen role="root"><userinput>pip3 install --no-index --find-links dist --no-cache-dir --no-user Babel</userinput></screen>
     100
     101    <para>
     102      Assuming <xref linkend="pytest"/> is installed, but the other optional
     103      dependencies are not, the installation can be tested with the following
     104      commands:
     105    </para>
     106
     107<screen remap="test"><userinput>python3 -m venv --system-site-packages testenv &amp;&amp;
     108source testenv/bin/activate                    &amp;&amp;
     109pip3 install pytest-cov freezegun==0.3.12      &amp;&amp;
     110python3 /usr/bin/pytest                        &amp;&amp;
     111deactivate</userinput></screen>
     112
     113    <para>
     114      One test involving zh_TW locale is known to fail.
     115    </para>
    93116
    94117    </sect3>
  • general/prog/python-dependencies/attrs.xml

    r7775697 r114f6db9  
    6666      </itemizedlist>
    6767
     68      <bridgehead renderas="sect5">Optional (for testing)</bridgehead>
     69      <para role="optional">
     70        <xref linkend="pytest"/>,
     71        <ulink url="https://pypi.org/project/coverage/">coverage[toml]</ulink>,
     72        <ulink url="https://pypi.org/project/hypothesis/">hypothesis</ulink>,
     73        <ulink url="https://pypi.org/project/Pympler/">Pympler</ulink>,
     74        <ulink url="https://pypi.org/project/mypy/">mypy</ulink>,
     75        <ulink url="https://pypi.org/project/pytest-mypy-plugins/">pytest-mypy-plugins</ulink>,
     76        <ulink url="https://pypi.org/project/zope.interface/">zope.interface</ulink>, and
     77        <ulink url="https://pypi.org/project/cloudpickle/">cloudpickle</ulink>
     78      </para>
     79
    6880    </sect3>
    6981
     
    7688
    7789    <para>
    78       This package does not come with a test suite.
    79     </para>
    80 
    81     <para>
    8290      Now, as the <systemitem class="username">root</systemitem> user:
    8391    </para>
    8492
    8593<screen role="root"><userinput>pip3 install --no-index --find-links dist --no-cache-dir --no-user attrs</userinput></screen>
     94
     95    <para>
     96      To test the installation, run:
     97    </para>
     98
     99<screen remap="test"><userinput>python3 -m venv --system-site-packages testenv &amp;&amp;
     100source testenv/bin/activate                    &amp;&amp;
     101pip3 install attrs[tests]                      &amp;&amp;
     102python3 /usr/bin/pytest tests                  &amp;&amp;
     103deactivate</userinput></screen>
    86104
    87105    </sect3>
  • general/prog/python-dependencies/pytz.xml

    r7775697 r114f6db9  
    6868      <bridgehead renderas="sect4">Pytz dependencies</bridgehead>
    6969
    70       <bridgehead renderas="sect5">Recommended</bridgehead>
    71       <para role="recommended">
    72         <xref linkend="rsync"/> (used in the build instructions)
     70      <bridgehead renderas="sect5">Optional (for testing)</bridgehead>
     71      <para role="optional">
     72        <xref linkend="pytest"/>
    7373      </para>
    7474
     
    8585
    8686      <para>
    87         This package does not come with a test suite.
    88       </para>
    89 
    90       <para>
    9187        Now, as the <systemitem class="username">root</systemitem> user:
    9288      </para>
    9389
    9490<screen role="root"><userinput>pip3 install --no-index --find-links dist --no-cache-dir --no-user pytz</userinput></screen>
     91
     92      <para>
     93        To test the installation, run <command>pytest pytz/tests</command>.
     94      </para>
    9595
    9696    </sect3>
  • general/prog/python-modules/pytest.xml

    r7775697 r114f6db9  
    55  %general-entities;
    66
    7   <!ENTITY pytest-download-http "https://github.com/pytest-dev/pytest/archive/refs/tags/&pytest-version;/pytest-&pytest-version;.tar.gz">
     7  <!ENTITY pytest-download-http "https://files.pythonhosted.org/packages/source/p/pytest/pytest-&pytest-version;.tar.gz">
    88  <!ENTITY pytest-download-ftp  " ">
    9   <!ENTITY pytest-md5sum        "d9e98570d8b8822af4b39576f8f86abc">
     9  <!ENTITY pytest-md5sum        "c4de3e192e5bb4b39deada36cc2f393a">
    1010  <!ENTITY pytest-size          "1.2 MB">
    1111  <!ENTITY pytest-buildsize     "2.6 MB">
     
    8383      </para>
    8484
    85       <bridgehead renderas="sect5">Optional (runtime)</bridgehead>
     85      <bridgehead renderas="sect5">Optional (for testing)</bridgehead>
    8686      <para role="optional">
    87         <xref linkend="docbook-xsl"/>,
    88         <xref linkend="fop"/>,
    89         <xref linkend="libxslt"/>,
    90         <xref linkend="lynx"/>,
    91         <ulink url="https://sourceforge.net/projects/dblatex/">dblatex</ulink>, and
    92         <ulink url="&w3m-url;">W3m</ulink>
     87        <xref linkend="pygments"/>,
     88        <xref linkend="requests"/>,
     89        <ulink url="https://pypi.org/project/argcomplete/">argcomplete</ulink>,
     90        <ulink url="https://pypi.org/project/hypothesis/">hypothesis</ulink>,
     91        <ulink url="https://pypi.org/project/nose/">nose</ulink>, and
     92        <ulink url="https://pypi.org/project/xmlschema/">xmlschema</ulink>
    9393      </para>
    9494
     
    127127        <seglistitem>
    128128          <seg>
    129             pytest
     129            pytest and py.test (different files but with same content)
    130130          </seg>
    131131          <seg>None</seg>
    132132          <seg>
    133             /usr/lib/python&python3-majorver;/site-packages/pytest and
     133            /usr/lib/python&python3-majorver;/site-packages/_pytest,
     134            /usr/lib/python&python3-majorver;/site-packages/pytest, and
    134135            /usr/lib/python&python3-majorver;/site-packages/pytest-&pytest-version;.dist-info
    135136          </seg>
    136137        </seglistitem>
    137138      </segmentedlist>
    138       <!--
     139
    139140      <variablelist>
    140141        <bridgehead renderas="sect5">Short Descriptions</bridgehead>
     
    142143        <?dbhtml list-presentation="table"?>
    143144
    144         <varlistentry id="a2x">
    145           <term><command>a2x</command></term>
    146           <listitem>
    147             <para>
    148               is a toolchain manager for AsciiDoc
    149               (converts Asciidoc text files to other file formats)
    150             </para>
    151             <indexterm zone="pytest a2x">
    152               <primary sortas="b-a2x">a2x</primary>
    153             </indexterm>
    154           </listitem>
    155         </varlistentry>
    156 
    157145        <varlistentry id="pytest-prog">
    158146          <term><command>pytest</command></term>
    159147          <listitem>
    160148            <para>
    161               converts an AsciiDoc text file to HTML or DocBook
     149              sets up, manages, and/or runs test in python module source
     150              directories
    162151            </para>
    163152            <indexterm zone="pytest pytest-prog">
     
    168157
    169158      </variablelist>
    170       -->
     159
    171160    </sect3>
    172161
  • general/prog/python-modules/requests.xml

    r7775697 r114f6db9  
    7676      </para>
    7777
     78      <bridgehead renderas="sect5">Optional</bridgehead>
     79      <para role="optional">
     80        <ulink url="https://pypi.org/project/PySocks/">PySocks</ulink> (also needed for testing)
     81      </para>
     82
     83      <bridgehead renderas="sect5">Optional (for testing)</bridgehead>
     84      <para role="optional">
     85        <xref linkend="pytest"/>,
     86        <ulink url="https://pypi.org/project/Flask/">Flask</ulink>&lt;2,
     87        <ulink url="https://pypi.org/project/httpbin/">httpbin</ulink>,
     88        <ulink url="https://pypi.org/project/MarkupSafe/">MarkupSafe</ulink>&lt;2.1,
     89        <ulink url="https://pypi.org/project/pytest-mock/">pytest-mock</ulink>,
     90        <ulink url="https://pypi.org/project/pytest-httpbin/">pytest-httpbin</ulink>,
     91        <ulink url="https://pypi.org/project/trustme/">trustme</ulink>, and
     92        <ulink url="https://pypi.org/project/Werkzeug/">Werkzeug</ulink>&lt;2
     93      </para>
     94
    7895    </sect3>
    7996
     
    86103
    87104    <para>
    88       This package does not come with a test suite.
    89     </para>
    90 
    91     <para>
    92105      Now, as the <systemitem class="username">root</systemitem> user:
    93106    </para>
    94107
    95108<screen role="root"><userinput>pip3 install --no-index --find-links dist --no-cache-dir --no-user requests</userinput></screen>
     109
     110    <para>
     111      Assuming <xref linkend="pytest"/> is installed, but the other optional
     112      dependencies are not, the installation can be tested with the following
     113      commands:
     114    </para>
     115
     116<screen remap="test"><userinput>python3 -m venv --system-site-packages testenv &amp;&amp;
     117source testenv/bin/activate                    &amp;&amp;
     118pip3 install pytest-mock    \
     119             werkzeug\&lt;2    \
     120             flask\&lt;2       \
     121             pytest-httpbin \
     122             pysocks        \
     123             trustme                           &amp;&amp;
     124pip3 install --force-reinstall Markupsafe\&lt;2.1 &amp;&amp;
     125python3 /usr/bin/pytest tests                  &amp;&amp;
     126deactivate</userinput></screen>
    96127
    97128    </sect3>
Note: See TracChangeset for help on using the changeset viewer.