Changeset 74434cc


Ignore:
Timestamp:
10/16/2022 09:14:25 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:
6e98a080
Parents:
ef6402e
Message:

Add test instructions to new python modules

Location:
general/prog
Files:
13 edited

Legend:

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

    ref6402e r74434cc  
    2626      <para>
    2727        The <application>Py</application> library is a Python development
    28         support library used in <application>Pytest</application>.
     28        support library used in <application>Pytest</application>. It is
     29        deprecated and should be removed at some point in time, but part of
     30        it is still used in <application>Pytest</application>.
    2931      </para>
    3032
     
    8385
    8486    <para>
    85       This package does not come with a test suite.
     87      Now, as the <systemitem class="username">root</systemitem> user:
    8688    </para>
    8789
    8890    <para>
    89       Now, as the <systemitem class="username">root</systemitem> user:
     91      Due to the deprecation of this package, the test suite is not maintained
     92      and cannot be run.
    9093    </para>
    9194
  • general/prog/python-dependencies/pyparsing.xml

    ref6402e r74434cc  
    7878      <para role="optional">
    7979        <xref linkend="Jinja2"/> and
    80         <ulink url="https://pypi.org/project/railroad-diagrams/">railroad-diagrams</ulink>
     80        <ulink url="https://pypi.org/project/railroad-diagrams/">railroad-diagrams</ulink> (also needed for tests)
     81      </para>
     82
     83      <bridgehead renderas="sect5">Optional (for testing)</bridgehead>
     84      <para role="optional">
     85        <xref linkend="pytest"/>
    8186      </para>
    8287
     
    9196
    9297    <para>
    93       This package does not come with a test suite.
    94     </para>
    95 
    96     <para>
    9798      Now, as the <systemitem class="username">root</systemitem> user:
    9899    </para>
    99100
    100101<screen role="root"><userinput>pip3 install --no-index --find-links dist --no-cache-dir --no-user pyparsing</userinput></screen>
     102
     103    <para>
     104      Assuming <xref linkend="pytest"/> and <xref linkend="Jinja2"/> are
     105      installed, but the other optional dependency is not, the installation
     106      can be tested with the following commands:
     107    </para>
     108
     109<screen remap="test"><userinput>python3 -m venv --system-site-packages testenv &amp;&amp;
     110source testenv/bin/activate                    &amp;&amp;
     111pip3 install railroad-diagrams                 &amp;&amp;
     112python3 /usr/bin/pytest<!-- no && because of a possible error -->
     113deactivate</userinput></screen>
    101114
    102115    </sect3>
  • general/prog/python-dependencies/pytz.xml

    ref6402e r74434cc  
    9191
    9292      <para>
    93         To test the installation, run <command>pytest pytz/tests</command>.
     93        To test the installation, run <command>pytest</command>.
    9494      </para>
    9595
  • general/prog/python-dependencies/setuptools_scm.xml

    ref6402e r74434cc  
    7575      </para>
    7676
     77      <bridgehead renderas="sect5">Optional (for testing)</bridgehead>
     78      <para role="optional">
     79        <xref linkend="git"/>,
     80        <xref linkend="mercurial"/>, and
     81        <xref linkend="pytest"/>
     82      </para>
     83
    7784    </sect3>
    7885
     
    8592
    8693    <para>
    87       This package does not come with a test suite.
    88     </para>
    89 
    90     <para>
    9194      Now, as the <systemitem class="username">root</systemitem> user:
    9295    </para>
    9396
    9497<screen role="root"><userinput>pip3 install --no-index --find-links dist --no-cache-dir --no-user setuptools_scm</userinput></screen>
     98
     99    <para>
     100      The installtion can be tested with <command>pytest</command>. A few
     101      tests may fail is your <application>git</application> configuration
     102      is not the one expected by the test suite.
     103    </para>
    95104
    96105    </sect3>
  • general/prog/python-dependencies/sphinxcontrib-applehelp.xml

    ref6402e r74434cc  
    6868      <bridgehead renderas="sect4">Sphinxcontrib-applehelp Dependencies</bridgehead>
    6969
    70       <bridgehead renderas="sect5">Optional</bridgehead>
     70      <bridgehead renderas="sect5">Optional (for testing)</bridgehead>
    7171      <para role="optional">
    72         <xref linkend="pytest"/> (for tests),
    73         <ulink url="https://pypi.org/project/docutils-stubs/">
    74           docutils-stubs
    75         </ulink>,
    76         <ulink url="https://pypi.org/project/flake8/">
    77           flake8
    78         </ulink>, and
    79         <ulink url="https://pypi.org/project/mypy/">
    80           mypy
    81         </ulink>
     72        <xref linkend="pytest"/>
    8273      </para>
    8374
     
    9283
    9384    <para>
    94       This package does not come with a test suite.
    95     </para>
    96 
    97     <para>
    9885      Now, as the <systemitem class="username">root</systemitem> user:
    9986    </para>
    10087
    10188<screen role="root"><userinput>pip3 install --no-index --find-links dist --no-cache-dir --no-user sphinxcontrib-applehelp</userinput></screen>
     89
     90      <para>
     91        To test the installation, run <command>pytest</command>.
     92      </para>
    10293
    10394    </sect3>
  • general/prog/python-dependencies/sphinxcontrib-devhelp.xml

    ref6402e r74434cc  
    6969      <bridgehead renderas="sect4">Sphinxcontrib-devhelp Dependencies</bridgehead>
    7070
    71       <bridgehead renderas="sect5">Optional</bridgehead>
     71      <bridgehead renderas="sect5">Optional (for testing)</bridgehead>
    7272      <para role="optional">
    73         <xref linkend="pytest"/> (for tests),
    74         <ulink url="https://pypi.org/project/docutils-stubs/">
    75           docutils-stubs
    76         </ulink>,
    77         <ulink url="https://pypi.org/project/flake8/">
    78           flake8
    79         </ulink>, and
    80         <ulink url="https://pypi.org/project/mypy/">
    81           mypy
    82         </ulink>
     73        <xref linkend="pytest"/>
    8374      </para>
    8475
     
    9384
    9485    <para>
    95       This package does not come with a test suite.
    96     </para>
    97 
    98     <para>
    9986      Now, as the <systemitem class="username">root</systemitem> user:
    10087    </para>
    10188
    10289<screen role="root"><userinput>pip3 install --no-index --find-links dist --no-cache-dir --no-user sphinxcontrib-devhelp</userinput></screen>
     90
     91      <para>
     92        To test the installation, run <command>pytest</command>.
     93      </para>
    10394
    10495    </sect3>
  • general/prog/python-dependencies/sphinxcontrib-htmlhelp.xml

    ref6402e r74434cc  
    6868      <bridgehead renderas="sect4">Sphinxcontrib-htmlhelp Dependencies</bridgehead>
    6969
    70       <bridgehead renderas="sect5">Optional</bridgehead>
     70      <bridgehead renderas="sect5">Optional (for testing)</bridgehead>
    7171      <para role="optional">
    72         <xref linkend="pytest"/> (for tests),
    73         <ulink url="https://pypi.org/project/docutils-stubs/">
    74           docutils-stubs
    75         </ulink>,
    76         <ulink url="https://pypi.org/project/flake8/">
    77           flake8
    78         </ulink>,
    79         <ulink url="https://pypi.org/project/html5lib/">
    80           html5lib
    81         </ulink> (for tests), and
    82         <ulink url="https://pypi.org/project/mypy/">
    83           mypy
    84         </ulink>
     72        <xref linkend="pytest"/> and
     73        <ulink url="https://pypi.org/project/html5lib/">html5lib</ulink>
    8574      </para>
    8675
     
    9584
    9685    <para>
    97       This package does not come with a test suite.
    98     </para>
    99 
    100     <para>
    10186      Now, as the <systemitem class="username">root</systemitem> user:
    10287    </para>
    10388
    10489<screen role="root"><userinput>pip3 install --no-index --find-links dist --no-cache-dir --no-user sphinxcontrib-htmlhelp</userinput></screen>
     90
     91    <para>
     92      Assuming <xref linkend="pytest"/> is installed, but the other optional
     93      dependency is not, the installation can be tested with the following
     94      commands:
     95    </para>
     96
     97<screen remap="test"><userinput>python3 -m venv --system-site-packages testenv   &amp;&amp;
     98source testenv/bin/activate                      &amp;&amp;
     99pip3 install html5lib                            &amp;&amp;
     100sed -i 's/text()/read_&amp;/' tests/test_htmlhelp.py &amp;&amp;
     101python3 /usr/bin/pytest<!-- no && because of a possible error -->
     102deactivate</userinput></screen>
     103
     104    <para>
     105      the <command>sed ...</command> command is needed because of a change
     106      in <application>Sphinx</application> API for versions greater than
     107      5.0.
     108    </para>
    105109
    106110    </sect3>
  • general/prog/python-dependencies/sphinxcontrib-jsmath.xml

    ref6402e r74434cc  
    6868      <bridgehead renderas="sect4">Sphinxcontrib-jsmath Dependencies</bridgehead>
    6969
    70       <bridgehead renderas="sect5">Optional</bridgehead>
     70      <bridgehead renderas="sect5">Optional (for testing)</bridgehead>
    7171      <para role="optional">
    72         <xref linkend="pytest"/> (for tests),
    73         <ulink url="https://pypi.org/project/flake8/">
    74           flake8
    75         </ulink>, and
    76         <ulink url="https://pypi.org/project/mypy/">
    77           mypy
    78         </ulink>
     72        <xref linkend="pytest"/>
    7973      </para>
    8074
     
    8983
    9084    <para>
    91       This package does not come with a test suite.
    92     </para>
    93 
    94     <para>
    9585      Now, as the <systemitem class="username">root</systemitem> user:
    9686    </para>
    9787
    9888<screen role="root"><userinput>pip3 install --no-index --find-links dist --no-cache-dir --no-user sphinxcontrib-jsmath</userinput></screen>
     89
     90    <para>
     91      The installation can be tested with the following commands:
     92    </para>
     93
     94<screen remap="test"><userinput>sed -i 's/text()/read_&amp;/' tests/test_jsmath.py &amp;&amp;
     95pytest</userinput></screen>
     96
     97    <para>
     98      the <command>sed ...</command> command is needed because of a change
     99      in <application>Sphinx</application> API for versions greater than
     100      5.0.
     101    </para>
    99102
    100103    </sect3>
  • general/prog/python-dependencies/sphinxcontrib-qthelp.xml

    ref6402e r74434cc  
    6767
    6868      <bridgehead renderas="sect4">Sphinxcontrib-qthelp Dependencies</bridgehead>
    69 
    70       <bridgehead renderas="sect5">Optional</bridgehead>
     69      <bridgehead renderas="sect5">Optional (for testing)</bridgehead>
    7170      <para role="optional">
    72         <xref linkend="pytest"/> (for tests),
    73         <ulink url="https://pypi.org/project/docutils-stubs/">
    74           docutils-stubs
    75         </ulink>,
    76         <ulink url="https://pypi.org/project/flake8/">
    77           flake8
    78         </ulink>, and
    79         <ulink url="https://pypi.org/project/mypy/">
    80           mypy
    81         </ulink>
     71        <xref linkend="pytest"/>
    8272      </para>
    8373
     
    9282
    9383    <para>
    94       This package does not come with a test suite.
    95     </para>
    96 
    97     <para>
    9884      Now, as the <systemitem class="username">root</systemitem> user:
    9985    </para>
    10086
    10187<screen role="root"><userinput>pip3 install --no-index --find-links dist --no-cache-dir --no-user sphinxcontrib-qthelp</userinput></screen>
     88
     89    <para>
     90      The installation can be tested with the following commands:
     91    </para>
     92
     93<screen remap="test"><userinput>sed -i 's/text()/read_&amp;/' tests/test_qthelp.py &amp;&amp;
     94pytest</userinput></screen>
     95
     96    <para>
     97      The <command>sed ...</command> command is needed because of a change
     98      in <application>Sphinx</application> API for versions greater than
     99      5.0.
     100    </para>
     101
    102102
    103103    </sect3>
  • general/prog/python-dependencies/sphinxcontrib-serializinghtml.xml

    ref6402e r74434cc  
    6868      <bridgehead renderas="sect4">Sphinxcontrib-serializinghtml Dependencies</bridgehead>
    6969
    70       <bridgehead renderas="sect5">Optional</bridgehead>
     70      <bridgehead renderas="sect5">Optional (for testing)</bridgehead>
    7171      <para role="optional">
    72         <xref linkend="pytest"/> (for tests),
    73         <ulink url="https://pypi.org/project/docutils-stubs/">
    74           docutils-stubs
    75         </ulink>,
    76         <ulink url="https://pypi.org/project/flake8/">
    77           flake8
    78         </ulink>, and
    79         <ulink url="https://pypi.org/project/mypy/">
    80           mypy
    81         </ulink>
     72        <xref linkend="pytest"/>
    8273      </para>
    8374
     
    9283
    9384    <para>
    94       This package does not come with a test suite.
    95     </para>
    96 
    97     <para>
    9885      Now, as the <systemitem class="username">root</systemitem> user:
    9986    </para>
    10087
    10188<screen role="root"><userinput>pip3 install --no-index --find-links dist --no-cache-dir --no-user sphinxcontrib-serializinghtml</userinput></screen>
     89
     90      <para>
     91        To test the installation, run <command>pytest</command>.
     92      </para>
    10293
    10394    </sect3>
  • general/prog/python-dependencies/urllib3.xml

    ref6402e r74434cc  
    6666      </itemizedlist>
    6767
     68      <bridgehead renderas="sect4">Urllib3 Dependencies</bridgehead>
     69
     70      <bridgehead renderas="sect5">Optional (for tests)</bridgehead>
     71      <para role="optional">
     72        <xref linkend="pytest"/>,
     73        <ulink url="https://pypi.org/project/mock/">mock</ulink>,
     74        <ulink url="https://pypi.org/project/PySocks/">PySocks</ulink>,
     75        <ulink url="https://pypi.org/project/pytest-freezegun/">pytest-freezegun</ulink>,
     76        <ulink url="https://pypi.org/project/pytest-timeout/">pytest-timeout</ulink>,
     77        <ulink url="https://pypi.org/project/python-dateutil/">python-dateutil</ulink>,
     78        <ulink url="https://pypi.org/project/tornado/">tornado</ulink>, and
     79        <ulink url="https://pypi.org/project/trustme/">trustme</ulink>
     80      </para>
     81
    6882    </sect3>
    6983
     
    7690
    7791    <para>
    78       This package does not come with a test suite.
    79     </para>
    80 
    81     <para>
    8292      Now, as the <systemitem class="username">root</systemitem> user:
    8393    </para>
    8494
    8595<screen role="root"><userinput>pip3 install --no-index --find-links dist --no-cache-dir --no-user urllib3</userinput></screen>
     96
     97    <para>
     98      Assuming <xref linkend="pytest"/> is installed, but the other optional
     99      dependencies are not, the installation can be tested with the following
     100      commands:
     101    </para>
     102
     103<screen remap="test"><userinput>python3 -m venv --system-site-packages testenv &amp;&amp;
     104source testenv/bin/activate                    &amp;&amp;
     105pip3 install trustme         \
     106             tornado         \
     107             python-dateutil \
     108             mock            \
     109             pysocks         \
     110             pytest-timeout  \
     111             pytest-freezegun                  &amp;&amp;
     112python3 /usr/bin/pytest<!-- no && because of a possible error -->
     113deactivate</userinput></screen>
     114
     115    <para>
     116      A few errors are known to occur.
     117    </para>
    86118
    87119    </sect3>
  • general/prog/python-modules/pytest.xml

    ref6402e r74434cc  
    103103
    104104      <para>
    105         This package does not come with a test suite.
    106       </para>
    107 
    108       <para>
    109105        Now, as the <systemitem class="username">root</systemitem> user:
    110106      </para>
    111107
    112108<screen role="root"><userinput>pip3 install --no-index --find-links dist --no-cache-dir --no-user pytest</userinput></screen>
     109
     110      <para>
     111        The installation can be tested with the following commands:
     112      </para>
     113
     114<screen remap="test"><userinput>python3 -m venv --system-site-packages testenv &amp;&amp;
     115source testenv/bin/activate                    &amp;&amp;
     116pip3 install pytest[testing]                   &amp;&amp;
     117python3 /usr/bin/pytest<!-- no && because of a possible error -->
     118deactivate</userinput></screen>
    113119
    114120    </sect3>
  • general/prog/python-modules/sphinx.xml

    ref6402e r74434cc  
    8787      </para>
    8888
    89       <bridgehead renderas="sect5">Optional</bridgehead>
     89      <bridgehead renderas="sect5">Optional (for tests)</bridgehead>
    9090      <para role="optional">
    91         <xref linkend="cython"/> (for tests),
    92         <ulink url="https://pypi.org/project/docutils-stubs/">
    93           docutils-stubs
    94         </ulink>,
    95         <ulink url="https://pypi.org/project/flake8/">
    96           flake8
    97         </ulink>,
    98         <ulink url="https://pypi.org/project/flake8-comprehensions/">
    99           flake8-comprehensions
    100         </ulink>,
    101         <ulink url="https://pypi.org/project/flake8-bugbear/">
    102           flake8-bugbear
    103         </ulink>,
    104         <ulink url="https://pypi.org/project/flake8-simplify/">
    105           flake8-simplify
    106         </ulink>,
    107         <ulink url="https://pypi.org/project/html5lib/">
    108           html5lib
    109         </ulink> (for tests),
    110         <ulink url="https://pypi.org/project/isort/">
    111           isort
    112         </ulink>,
    113         <ulink url="https://pypi.org/project/mypy/">
    114           mypy
    115         </ulink>,
    116         <xref linkend="pytest"/> (for tests),
    117         <ulink url="https://pypi.org/project/sphinx-lint/">
    118           sphinx-lint
    119         </ulink>,
    120         <ulink url="https://pypi.org/project/sphinxcontrib-websupport/">
    121           sphinxcontrib-websupport
    122         </ulink> (for building documentation),
    123         <ulink url="https://pypi.org/project/types-requests/">
    124           types-requests
    125         </ulink>, and
    126         <ulink url="https://pypi.org/project/types-typed-ast/">
    127           types-typed-ast
    128         </ulink>,
     91        <xref linkend="cython"/>,
     92        <xref linkend="pytest"/>, and
     93        <ulink url="https://pypi.org/project/html5lib/">html5lib</ulink>
    12994      </para>
    13095
     
    137102
    138103<screen><userinput>pip3 wheel -w dist --no-build-isolation --no-deps $PWD</userinput></screen>
    139 
    140     <para>
    141       This package does not come with a test suite.
    142     </para>
    143104
    144105    <para>
     
    147108
    148109<screen role="root"><userinput>pip3 install --no-index --find-links dist --no-cache-dir --no-user sphinx</userinput></screen>
     110
     111    <para>
     112      Assuming <xref linkend="cython"/> and <xref linkend="pytest"/> are
     113      installed, but the other optional dependency is not, the installation
     114      can be tested with the following commands:
     115    </para>
     116
     117<screen remap="test"><userinput>python3 -m venv --system-site-packages testenv &amp;&amp;
     118source testenv/bin/activate                    &amp;&amp;
     119pip3 install html5lib                          &amp;&amp;
     120python3 /usr/bin/pytest<!-- no && because of a possible error -->
     121deactivate</userinput></screen>
    149122
    150123    </sect3>
Note: See TracChangeset for help on using the changeset viewer.