mirror of
https://github.com/novoid/appendfilename.git
synced 2026-02-16 12:54:15 +00:00
clarify the call sign issue of pytest
Depending on the installation/Linux distribution used, pytest for Python 3 may be invoked by either pytest, or pytest-3. The issue is addressed.
This commit is contained in:
parent
e28078103b
commit
49254c4429
2 changed files with 56 additions and 56 deletions
18
Makefile
Normal file → Executable file
18
Makefile
Normal file → Executable file
|
|
@ -1,11 +1,11 @@
|
|||
# GNU Make file for the automation of pytest for appendfilename.
|
||||
# GNU Make file for the automation of pytest for appendfilename
|
||||
#
|
||||
# While the test script is written for Python 3.9.2, you might need to
|
||||
# adjust the following instruction once in case your OS includes
|
||||
# pytest for legacy Python 2 side by side to Python 3, or only hosts
|
||||
# pytest for Python 3. The tests in script test_appendfilename.py are
|
||||
# set up to work with pytest for Python 3; dependent on your
|
||||
# installation, which may be named pytest-3, or (again) pytest.
|
||||
# While the test script is written for Python 3.9.2, it depends on
|
||||
# your installation of pytest (and in case of Linux, the authors of
|
||||
# your distribution) if pytest for Python 3 is invoked either by
|
||||
# pytest, or pytest-3. In some distributions, pytest actually may
|
||||
# invoke pyest for legacy Python 2; the tests in test_date2name.py
|
||||
# however are incompatible to this.
|
||||
#
|
||||
# Put this file like test_appendfilename.py in the root folder of
|
||||
# appendfilename fetched from PyPi or GitHub. Then run
|
||||
|
|
@ -17,5 +17,5 @@
|
|||
# right after the first test failing, use the -x flag to the
|
||||
# instructions on the CLI in addition to the verbosity flag to (-v).
|
||||
|
||||
# pytest -v test_appendfilename.py # only pytest for Python 3 is present
|
||||
pytest-3 -v test_appendfilename.py # pytest if Python 2 and Python 3 coexist
|
||||
# pytest -v test_appendfilename.py # the pattern by pytest's manual
|
||||
pytest-3 -v test_appendfilename.py # the alternative pattern (e.g., Debian 12)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# name: test_generator.org
|
||||
# author: nbehrnd@yahoo.com
|
||||
# date: 2022-01-05 (YYYY-MM-DD)
|
||||
# edit: 2022-01-06 (YYYY-MM-DD)
|
||||
# edit: 2022-01-09 (YYYY-MM-DD)
|
||||
# license: GPL3, 2022.
|
||||
# Export the tangled files with C-c C-v t
|
||||
|
||||
|
|
@ -22,24 +22,24 @@
|
|||
|
||||
* Deployment
|
||||
|
||||
On a computer with Python 3 only, the recommended call on the CLI to
|
||||
run the tests is either one of the following instructions (you might
|
||||
need to add the executable bit):
|
||||
The programmatic tests are set up for pytest for Python 3. It
|
||||
however depends on your installation (and in case of Linux, the
|
||||
authors of your Linux distribution ([[https://github.com/pytest-dev/pytest/discussions/9481][reference]])) if this utility may
|
||||
be started by =pytest= (e.g., the pattern in pytest's manual), or by
|
||||
=pytest-3= by either one of the pattern below:
|
||||
|
||||
#+begin_src bash :tangle no
|
||||
python pytest -v test_appendfilename.py
|
||||
./Makefile
|
||||
pytest -v test_appendfilename.py
|
||||
pytest-3 -v test_appendfilename.py
|
||||
#+end_src
|
||||
|
||||
In case the computer you use equally includes an installation of
|
||||
legacy Python 2 side-by-side to Python 3, you must explicitly call
|
||||
for the later branch of the two. Depending on your OS, this
|
||||
requires an adjustment of the command issued. In Linux Debian
|
||||
12/bookworm, branch testing, for example,
|
||||
As of writing, the later pattern is the to be used e.g., in Linux
|
||||
Debian 12/bookworm (branch testing) to discern pytest (for
|
||||
contemporary Python 3) from pytest (for legacy Python 2).
|
||||
|
||||
#+begin_src bash :tangle no
|
||||
python3 pytest-3 -v test_appendfilename.py
|
||||
#+end_src
|
||||
The =Makefile= this =org= file provides for convenience running
|
||||
these tests assumes the later syntax pattern. (It might be
|
||||
necessary to provide the executable bit to activate the Makefile.)
|
||||
|
||||
* Setup of Emacs
|
||||
|
||||
|
|
@ -108,14 +108,14 @@
|
|||
Makefile.
|
||||
|
||||
#+BEGIN_SRC makefile :tangle Makefile
|
||||
# GNU Make file for the automation of pytest for appendfilename.
|
||||
# GNU Make file for the automation of pytest for appendfilename
|
||||
#
|
||||
# While the test script is written for Python 3.9.2, you might need to
|
||||
# adjust the following instruction once in case your OS includes
|
||||
# pytest for legacy Python 2 side by side to Python 3, or only hosts
|
||||
# pytest for Python 3. The tests in script test_appendfilename.py are
|
||||
# set up to work with pytest for Python 3; dependent on your
|
||||
# installation, which may be named pytest-3, or (again) pytest.
|
||||
# While the test script is written for Python 3.9.2, it depends on
|
||||
# your installation of pytest (and in case of Linux, the authors of
|
||||
# your distribution) if pytest for Python 3 is invoked either by
|
||||
# pytest, or pytest-3. In some distributions, pytest actually may
|
||||
# invoke pyest for legacy Python 2; the tests in test_date2name.py
|
||||
# however are incompatible to this.
|
||||
#
|
||||
# Put this file like test_appendfilename.py in the root folder of
|
||||
# appendfilename fetched from PyPi or GitHub. Then run
|
||||
|
|
@ -127,8 +127,8 @@
|
|||
# right after the first test failing, use the -x flag to the
|
||||
# instructions on the CLI in addition to the verbosity flag to (-v).
|
||||
|
||||
# pytest -v test_appendfilename.py # only pytest for Python 3 is present
|
||||
pytest-3 -v test_appendfilename.py # pytest if Python 2 and Python 3 coexist
|
||||
# pytest -v test_appendfilename.py # the pattern by pytest's manual
|
||||
pytest-3 -v test_appendfilename.py # the alternative pattern (e.g., Debian 12)
|
||||
#+end_src
|
||||
|
||||
** Building a pytest.ini
|
||||
|
|
|
|||
Loading…
Reference in a new issue