source: general/prog/python-modules/pytest.xml@ b112f043

11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18 xry111/xf86-video-removal
Last change on this file since b112f043 was b112f043, checked in by Pierre Labastie <pierre.labastie@…>, 15 months ago

Add figures and a few fixes for new python modules

  • Property mode set to 100644
File size: 5.4 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect2 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../../general.ent">
5 %general-entities;
6
7 <!ENTITY pytest-download-http "https://files.pythonhosted.org/packages/source/p/pytest/pytest-&pytest-version;.tar.gz">
8 <!ENTITY pytest-download-ftp " ">
9 <!ENTITY pytest-md5sum "366a4047534ef0485f700c20bb574f67">
10 <!ENTITY pytest-size "1.2 MB">
11 <!ENTITY pytest-buildsize "10 MB (add 31 MB for tests)">
12 <!ENTITY pytest-time "less than 0.1 SBU (1.1 SBU for tests)">
13]>
14
15 <sect2 id="pytest" xreflabel="pytest-&pytest-version;">
16
17 <title>Pytest-&pytest-version;</title>
18
19 <indexterm zone="pytest">
20 <primary sortas="a-pytest">pytest</primary>
21 </indexterm>
22
23 <sect3 role="package">
24 <title>Introduction to Pytest Module</title>
25
26 <para>
27 The <application>Pytest</application> framework makes it easy to
28 write small, readable tests, and can scale to support complex
29 functional testing for applications and libraries.
30 </para>
31
32 &lfs112_checked;
33
34 <bridgehead renderas="sect4">Package Information</bridgehead>
35 <itemizedlist spacing="compact">
36 <listitem>
37 <para>
38 Download (HTTP): <ulink url="&pytest-download-http;"/>
39 </para>
40 </listitem>
41 <listitem>
42 <para>
43 Download (FTP): <ulink url="&pytest-download-ftp;"/>
44 </para>
45 </listitem>
46 <listitem>
47 <para>
48 Download MD5 sum: &pytest-md5sum;
49 </para>
50 </listitem>
51 <listitem>
52 <para>
53 Download size: &pytest-size;
54 </para>
55 </listitem>
56 <listitem>
57 <para>
58 Estimated disk space required: &pytest-buildsize;
59 </para>
60 </listitem>
61 <listitem>
62 <para>
63 Estimated build time: &pytest-time;
64 </para>
65 </listitem>
66 </itemizedlist>
67
68 <bridgehead renderas="sect4">Pytest Dependencies</bridgehead>
69
70 <bridgehead renderas="sect5">Required</bridgehead>
71 <para role="required">
72 <xref linkend="attrs"/>,
73 <xref linkend="iniconfig"/>,
74 <xref linkend="packaging"/>,
75 <xref linkend="pluggy"/>, and
76 <xref linkend="py"/>,
77 </para>
78
79 <bridgehead renderas="sect5">Recommended</bridgehead>
80 <para role="recommended">
81 <xref linkend="setuptools_scm"/>
82 </para>
83
84 <bridgehead renderas="sect5">Optional (for testing)</bridgehead>
85 <para role="optional">
86 <xref linkend="pygments"/>,
87 <xref linkend="requests"/>,
88 <ulink url="https://pypi.org/project/argcomplete/">argcomplete</ulink>,
89 <ulink url="https://pypi.org/project/hypothesis/">hypothesis</ulink>,
90 <ulink url="https://pypi.org/project/mock/">mock</ulink>,
91 <ulink url="https://pypi.org/project/nose/">nose</ulink>, and
92 <ulink url="https://pypi.org/project/xmlschema/">xmlschema</ulink>
93 </para>
94
95 </sect3>
96
97 <sect3 role="installation">
98 <title>Installation of Pytest</title>
99
100 <para> Build the module: </para>
101
102<screen><userinput>pip3 wheel -w dist --no-build-isolation --no-deps $PWD</userinput></screen>
103
104 <para>
105 Now, as the <systemitem class="username">root</systemitem> user:
106 </para>
107
108<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>
119
120 </sect3>
121
122 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
123 href="../../../xincludes/pip3-cmd-explain.xml"/>
124
125 <sect3 role="content">
126 <title>Contents</title>
127
128 <segmentedlist>
129 <segtitle>Installed Programs</segtitle>
130 <segtitle>Installed Libraries</segtitle>
131 <segtitle>Installed Directories</segtitle>
132
133 <seglistitem>
134 <seg>
135 pytest and py.test (different files but with same content)
136 </seg>
137 <seg>None</seg>
138 <seg>
139 /usr/lib/python&python3-majorver;/site-packages/_pytest,
140 /usr/lib/python&python3-majorver;/site-packages/pytest, and
141 /usr/lib/python&python3-majorver;/site-packages/pytest-&pytest-version;.dist-info
142 </seg>
143 </seglistitem>
144 </segmentedlist>
145
146 <variablelist>
147 <bridgehead renderas="sect5">Short Descriptions</bridgehead>
148 <?dbfo list-presentation="list"?>
149 <?dbhtml list-presentation="table"?>
150
151 <varlistentry id="pytest-prog">
152 <term><command>pytest</command></term>
153 <listitem>
154 <para>
155 sets up, manages, and/or runs test in python module source
156 directories
157 </para>
158 <indexterm zone="pytest pytest-prog">
159 <primary sortas="b-pytest-prog">pytest</primary>
160 </indexterm>
161 </listitem>
162 </varlistentry>
163
164 </variablelist>
165
166 </sect3>
167
168 </sect2>
Note: See TracBrowser for help on using the repository browser.