From a9984727fbd34fe1c8a522037efff69f8673736b Mon Sep 17 00:00:00 2001 From: Norwid Behrnd Date: Thu, 25 Nov 2021 17:52:45 +0100 Subject: [PATCH] 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. --- test_date2name.py | 11 +---------- test_generator.org | 37 ++++++++++++++----------------------- 2 files changed, 15 insertions(+), 33 deletions(-) mode change 100644 => 100755 test_date2name.py diff --git a/test_date2name.py b/test_date2name.py old mode 100644 new mode 100755 index 4dd8c8a..2ca06f8 --- a/test_date2name.py +++ b/test_date2name.py @@ -4,7 +4,7 @@ # author: nbehrnd@yahoo.com # license: GPL v3, 2021. # date: 2021-08-30 (YYYY-MM-DD) -# edit: 2021-09-29 (YYYY-MM-DD) +# edit: 2021-11-25 (YYYY-MM-DD) # """Test pad for functions by date2name with pytest. @@ -87,15 +87,6 @@ def test_script_existence(): """Merely check for the script's presence.""" assert os.path.isfile(PROGRAM) - -@pytest.mark.elementary -def test_script_version(): - """Check for the correct output of the version. - - CLI equivalence: date2name --version """ - out = getoutput(f"python3 {PROGRAM} --version") - assert out.strip() == "__init__.py 2018-05-09" - @pytest.mark.files @pytest.mark.default @pytest.mark.parametrize("arg1", [" ", "-f", "--files", diff --git a/test_generator.org b/test_generator.org index 4e2f519..08e7213 100755 --- a/test_generator.org +++ b/test_generator.org @@ -1,6 +1,6 @@ #+NAME: test_generator.org #+AUTHOR: nbehrnd@yahoo.com -#+DATE: 2021-09-29 (YYYY-MM-DD) +#+DATE: 2021-11-25 (YYYY-MM-DD) # License: GPL3, 2021. #+PROPERTY: header-args :tangle yes @@ -135,7 +135,7 @@ # author: nbehrnd@yahoo.com # license: GPL v3, 2021. # date: 2021-08-30 (YYYY-MM-DD) - # edit: 2021-09-29 (YYYY-MM-DD) + # edit: 2021-11-25 (YYYY-MM-DD) # """Test pad for functions by date2name with pytest. @@ -211,35 +211,26 @@ #+begin_src python :tangle test_date2name.py @pytest.mark.elementary def test_create_remove_testfile(name=TFILE): - """Merely check if the test file may be written and removed.""" - prepare_testfile(name=TFILE) - assert os.path.isfile(name) - os.remove(name) - assert os.path.isfile(name) is False + """Merely check if the test file may be written and removed.""" + prepare_testfile(name=TFILE) + assert os.path.isfile(name) + os.remove(name) + assert os.path.isfile(name) is False @pytest.mark.elementary def test_create_remove_testfolder(name=TFOLDER): - """Probe the generation/removal of a test folder.""" - prepare_testfolder(name=TFOLDER) - assert os.path.isdir(name) - os.rmdir(name) - assert os.path.isdir(name) is False + """Probe the generation/removal of a test folder.""" + prepare_testfolder(name=TFOLDER) + assert os.path.isdir(name) + os.rmdir(name) + assert os.path.isdir(name) is False @pytest.mark.elementary def test_script_existence(): - """Merely check for the script's presence.""" - assert os.path.isfile(PROGRAM) - - - @pytest.mark.elementary - def test_script_version(): - """Check for the correct output of the version. - - CLI equivalence: date2name --version """ - out = getoutput(f"python3 {PROGRAM} --version") - assert out.strip() == "__init__.py 2018-05-09" + """Merely check for the script's presence.""" + assert os.path.isfile(PROGRAM) #+end_src