diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000..8f466c6 --- /dev/null +++ b/pytest.ini @@ -0,0 +1,5 @@ +[pytest] +Markers = + default: appendfilename's default string insertions + prepend: appendfilename's optional -p/--prepend flag + smart: appendfilename's optional --smart-prepend flag diff --git a/test_appendfilename.py b/test_appendfilename.py index f47bb62..e930c07 100755 --- a/test_appendfilename.py +++ b/test_appendfilename.py @@ -73,6 +73,7 @@ arg3_values = [ # create the permutations: test_cases = list(product(arg1_values, arg2_values, arg3_values)) +@pytest.mark.default @pytest.mark.parametrize("arg1, arg2, arg3", test_cases) def test_append(arg1, arg2, arg3): """Test default which appends a string just prior file extension @@ -139,6 +140,7 @@ arg4_values = [ # create the permutations: test_cases = list(product(arg1_values, arg2_values, arg3_values, arg4_values)) +@pytest.mark.prepend @pytest.mark.parametrize("arg1, arg2, arg3, arg4", test_cases) def test_prepend(arg1, arg2, arg3, arg4): """test to prepend a string to the original file name @@ -209,6 +211,7 @@ arg3_values = [ # create the permutations: test_cases = list(product(arg1_values, arg2_values, arg3_values)) +@pytest.mark.smart @pytest.mark.parametrize("arg1, arg2, arg3", test_cases) def test_smart_prepend(arg1, arg2, arg3): """test the insertion of a new string just past the time stamp diff --git a/test_generator.org b/test_generator.org index fd49d55..78b7a93 100755 --- a/test_generator.org +++ b/test_generator.org @@ -156,12 +156,12 @@ pytest-3 test_appendfilename.py -v -m "default" pytest-3 test_appendfilename.py -m "default and prepend" -v #+end_src - #+begin_src python :tangle no + #+begin_src python :tangle pytest.ini [pytest] Markers = - default: check the default insertion position of appendfile - prepend: check the prepend insertion position of appendfile - smart: check the smart-prepend insertion position of appendfile + default: appendfilename's default string insertions + prepend: appendfilename's optional -p/--prepend flag + smart: appendfilename's optional --smart-prepend flag #+end_src @@ -253,6 +253,7 @@ arg3_values = [ # create the permutations: test_cases = list(product(arg1_values, arg2_values, arg3_values)) +@pytest.mark.default @pytest.mark.parametrize("arg1, arg2, arg3", test_cases) def test_append(arg1, arg2, arg3): """Test default which appends a string just prior file extension @@ -328,6 +329,7 @@ arg4_values = [ # create the permutations: test_cases = list(product(arg1_values, arg2_values, arg3_values, arg4_values)) +@pytest.mark.prepend @pytest.mark.parametrize("arg1, arg2, arg3, arg4", test_cases) def test_prepend(arg1, arg2, arg3, arg4): """test to prepend a string to the original file name @@ -413,6 +415,7 @@ arg3_values = [ # create the permutations: test_cases = list(product(arg1_values, arg2_values, arg3_values)) +@pytest.mark.smart @pytest.mark.parametrize("arg1, arg2, arg3", test_cases) def test_smart_prepend(arg1, arg2, arg3): """test the insertion of a new string just past the time stamp