Commit graph

82 commits

Author SHA1 Message Date
Norwid Behrnd
fa392db03d clarify how to invoke pytest
Maintainers/developers of pytest have little influence only if
pytest (for Python 3) in Linux is invoked by pytest, or pytest-3.
Commit accounts for their clarification provided.
2022-01-09 10:21:26 +01:00
Norwid Behrnd
1906e48038 update from KVoit/master into revision 2022-01-09 09:47:38 +01:00
Karl Voit
f0345eecd5 test_generator: minor bugfix of typo in docu 2022-01-03 20:25:59 +01:00
Karl Voit
4ff8900bf5
Merge pull request #20 from nbehrnd/revision
add minimal Emacs parameter block
2022-01-03 20:13:47 +01:00
Norwid Behrnd
b92a5c23de add minimal Emacs parameter block
To ensure e.g., coherent indentation of Python snippets tangled,
the explicit adjustment of Emacs' parameters is useful.  The .org
file now contains the block the previous commit omitted.  While
descriptions were edited, there is no functional change in the
files tangled.
2022-01-03 16:53:31 +01:00
Karl Voit
30d06bee26
Merge pull request #19 from nbehrnd/revision
revise indentation rules for tangled Python snippets
2021-12-30 18:25:49 +01:00
Norwid Behrnd
6424dc6c2b revise indentation rules for tangled Python snippets
A pristine installation of GNU Emacs 27.1 tangles (C-c C-v t) code
blocks of Python with lines lead by spaces and tabs for the second
(and higher) level of indentation.  The same may be observed when
running Emacs e.g., with

emacs -q placeholder.org

from the CLI.  This pattern however may inhibit the subsequent
processing of test_date2name.py with Python.

By addition of a dedicated code block, the relevant parameters are
adjusted explicitly by evaluation (C-c C-c) of Emacs-lisp.
2021-12-30 16:20:31 +01:00
Karl Voit
64c9599f41
Merge pull request #18 from nbehrnd/re_02b
remove version test on date2name
2021-11-25 18:49:50 +01:00
Norwid Behrnd
a9984727fb remove version test on date2name
The check of the current version of __init.py__, which was based on
comparison of the the manually entered time stamp is dropped.  It
no longer is perceived as helpful here.
2021-11-25 17:52:45 +01:00
Karl Voit
6ee7364180 updated version string after latest pull requests 2021-11-25 15:26:44 +01:00
Karl Voit
9e9606ae39
Merge pull request #17 from nbehrnd/re_02
bugfix stamp retraction
2021-11-25 15:22:49 +01:00
nbehrnd
4f3dd2a146
update README.org (stamp retraction) 2021-11-25 12:19:14 +01:00
Norwid Behrnd
25dda29fb5 Simplify scope of regex
As long as years as written with integers of four decimals, \d{4,4}
may be substituted by \d{4}, too.
2021-11-25 11:01:08 +01:00
Norwid Behrnd
51aaed2d01 redefine month pattern (explicit day truncation)
Regexes' grouping with parentheses and the definition of the
standard pattern just ahead of the month pattern allowed to spot
a plausible cause for the problem to retract all autogenerated
stamps.  In the present scope of pytest, the additional lookafter
now sufficies to enable the retraction of all five stamp pattern.
2021-11-25 10:41:24 +01:00
Norwid Behrnd
116a0a3aa3 Complete regex grouping
The regexes are easier to read if their elements are grouped in
parentheses.  Some already were organized this way, so this commit
only extends the pattern to cover all of them.  Pytest does not
identify a functional change.
2021-11-25 10:12:03 +01:00
Karl Voit
d63b004b66
Merge pull request #16 from nbehrnd/retract
Reorganization of the tests on files, extension on folders
2021-11-11 15:28:06 +01:00
Norwid Behrnd
287939add1 transplant file test (remove) on folders
Again, testing fails for the two variants -r/--remove when aiming
to retract a -w/--withtime stamp.  This commit eventually offers
the same coverage of tests now on folders (all five fixed stamp
pattern to add and their retraction).
2021-09-29 11:47:17 +00:00
Norwid Behrnd
d630277ed6 transplant file test (withtime) on folders 2021-09-29 10:17:56 +00:00
Norwid Behrnd
765179c2a1 transplant file test (short) on folders 2021-09-29 09:58:09 +00:00
Norwid Behrnd
ec1a3ccf2b transplant file test (month) on folders 2021-09-29 09:50:58 +00:00
Norwid Behrnd
72c8274385 transplant file test (compact) on folders 2021-09-29 09:43:26 +00:00
Norwid Behrnd
6dfe900beb transplant file test (default) on folders 2021-09-29 09:36:04 +00:00
Norwid Behrnd
bda8757f01 Sort sequence of entries present.
Because the pattern for testing on files will be used for the on
folders, a reorganization of the instructions.  Stamps checked so
far are generated either in default pattern, or (compact, month,
short) pattern, or with time.  Thus, it appears reasonable to
harmonize this sequence across the relevant files.
2021-09-29 08:40:52 +00:00
Norwid Behrnd
21935c7aac Introduce second layer of pytest marks.
Many of pytest's test functions iterate over levels.  For local
testing of date2name's action, e.g. about --remove, it may be
useful to narrow testing further than only "files" (and later, to
"folders").  Thus, a second layer of keyword markers was introduced
which may be used in two forms:
+ in combination with either one of (files, folders) for a check
  which would check e.g., the remove of stamps on files; or
+ independent og (files, folders) to check e.g., the remove of
  stamps on files and on folders
2021-09-29 07:33:47 +00:00
Norwid Behrnd
55cd6445ef Group pytest's tests (elementary, files).
The introduction of a pytest.ini appears as a convienient approach
to group tests of pytests sharing an element in common.  This seems
beneficial as long as there is no reliable approch identified to
stack "file" and "folder" as levels of an additional parameter in
theses tests for date2name.

By now, the two layers "elementary" and "files" are installed.
2021-09-29 07:01:01 +00:00
Norwid Behrnd
ba14f65f34 Initialize folder testing (elementary tests).
First tests on generation/remove of folders before date2name's
action on folders.
2021-09-28 17:13:41 +00:00
Norwid Behrnd
d1f5672db0 Adjust present test functions to file.
The present test functions act on files only.  Early tests to stack
folders on top of the present functions do not work reliably yet.
Thus, better to name the functions (uniformly) about what they test
which are actions on files only.  This change equally prevents some
line breaks on the CLI, too.
2021-09-28 15:06:33 +00:00
Norwid Behrnd
20fbfe2504 Change names to query creation/modification time.
Down the road, the application's action on folders will be checked
as well.  Thus, it is appropriate to alter the functions' names to
querry the time of creation/modifications into a more flexible, yet
correct form.
2021-09-28 14:41:00 +00:00
Norwid Behrnd
7504aead86 Continue on all tests, even if one fails.
The retraction of the -x parameter for pytest ensures that all
test functions defined are actually used.  Previously, testing
stopped immediately, conveying an incomplete picture of date2name's
work implemented.  Testing the retraction option -r, there is no
need for a delay between the indivdual options, either.
2021-09-28 14:26:46 +00:00
Norwid Behrnd
2e3654fd78 error retracting tags, ticketed version
The development version on GitHub offers the option to retract
time stamps date2name prepended to the files' file names.  As this
version of the test script reveals, stamps obtained with the option
--withtime however are not fully reverted.  The finding was shared
with Karl Voit as an issue for date2name earlier today (2021-09-22)
for a cross check.
2021-09-22 21:00:53 +00:00
Karl Voit
051254b9d6
Merge pull request #14 from nbehrnd/short
completion file testing, date2name
2021-09-20 19:04:54 +02:00
Norwid Behrnd
ed8b3652c9 Include short datestamp for files in tests.
The tests include Reiner Rottmann's suggestion of a short timestamp
(i.e., YYMMDD) on files.
2021-09-17 16:48:38 +00:00
Norwid Behrnd
7dc1dc6d2e Correct errors calling/documenting the tests. 2021-09-17 16:16:52 +00:00
Karl Voit
f2cc6fae20
Merge pull request #13 from nbehrnd/testscript
initialize programmatic tests (with pytest)
2021-09-03 11:37:03 +02:00
Norwid Behrnd
2af0ee87df initialize programmatic tests (with pytest)
An Emacs .org file is the source in to (re)create a Python script
to perform a few tests on date2name's functions to prepend a date/
time stamp.  The .org file equally is source for the Makefile to
automate the testing even further.

Set up for and tested in Linux Debian 12/bookworm (branch testing)
with Python 3.9.2, pytest 6.2.4 (for Python 3); GNU Make 4.3;
GNU Emacs 27.1 backed by elpa org 9.4.0.
2021-09-02 14:52:09 +00:00
Karl Voit
6c8f37277e
Merge pull request #12 from rrottmann/feature/datestamp_removal
Feature/datestamp removal
2021-06-20 18:10:08 +02:00
Reiner Rottmann
6393f871c8 Implemented datestamp removal. 2021-06-18 19:32:56 +02:00
Reiner Rottmann
46ba880235 Added short datestamp YYMMDD. 2021-06-18 07:20:38 +02:00
Karl Voit
7184c1f282 README: added d2n + Python hint 2020-04-24 11:10:16 +02:00
Karl Voit
4c481416a1 README: integratethis method 2020-03-22 15:01:39 +01:00
Karl Voit
521901251a README: re-ordering install sections 2020-03-22 15:00:28 +01:00
Karl Voit
75be162a53 README: integratethis method 2020-03-22 14:57:48 +01:00
Karl Voit
39c1acfa29 Windows screencast GIF 2020-03-22 14:44:15 +01:00
Karl Voit
f00860d0ed Windows screencast GIF 2020-03-22 14:39:01 +01:00
Karl Voit
61001167a2 Windows screencast GIF 2020-03-22 14:37:48 +01:00
Karl Voit
8a0efb1b93 Windows screencast GIF 2020-03-22 14:36:28 +01:00
Karl Voit
d13b80b1c5 fixed ctime on macOS and closing #6 2019-04-04 11:21:24 +02:00
Karl Voit
01a3a4169e README: linked https://github.com/DerBeutlin/date2name.el 2018-07-08 15:50:46 +02:00
Karl Voit
920e551384 README: added hints to integratethis 2018-05-13 11:03:39 +02:00
Karl Voit
5e8199e424 added --delimiter CLI argument for overwriting the delimiter; fixes #4 2018-05-09 13:49:47 +02:00