diff --git a/test-cockpit-python.el b/test-cockpit-python.el index c40a122..d37dea1 100644 --- a/test-cockpit-python.el +++ b/test-cockpit-python.el @@ -54,7 +54,8 @@ "--no-cov" "--cov" "--cov-report" - "-rFP" + "-r" + "--log-level" "--disable-warnings" "--capture=no" "-k" @@ -129,6 +130,14 @@ :key "-m" :argument "-m") +(transient-define-infix test-cockpit-python--choose-loglevel () + :class 'transient-switches + :key "-l" + :argument-format "--log-level=%s -rA" + :argument-regexp "\\(--log-level=\\(debug\\|info\\|warn\\|error\\) -rA\\)" + :choices '("debug" "info" "warn" "error") + :description "log level") + (defun test-cockpit-python--infix () "Setup the pytest specific test switches." [["Switches" @@ -140,6 +149,7 @@ ["Output" ("-v" "show single tests" "--verbose") ("-V" "verbose output" "-vv") + (test-cockpit-python--choose-loglevel) ("-c" "print coverage report" "--cov-report=term-missing") ("-r" "report output of passed tests" "-rFP") ("-w" "don't output warnings" "--disable-warnings") diff --git a/test/test-python.el-test.el b/test/test-python.el-test.el index 6aa8d82..f1cf219 100644 --- a/test/test-python.el-test.el +++ b/test/test-python.el-test.el @@ -399,7 +399,7 @@ async def test_first_outer(): (should (equal (aref (aref infix 1) 0) "Output")) (should (equal (aref (aref infix 1) 1) '("-v" "show single tests" "--verbose"))) (should (equal (aref (aref infix 1) 2) '("-V" "verbose output" "-vv"))) - (should (equal (aref (aref infix 1) 3) '("-c" "print coverage report" "--cov-report=term-missing"))) - (should (equal (aref (aref infix 1) 4) '("-r" "report output of passed tests" "-rFP"))) - (should (equal (aref (aref infix 1) 5) '("-w" "don't output warnings" "--disable-warnings"))) - (should (equal (aref (aref infix 1) 6) '("-n" "don't capture output" "--capture=no")))))) + (should (equal (aref (aref infix 1) 4) '("-c" "print coverage report" "--cov-report=term-missing"))) + (should (equal (aref (aref infix 1) 5) '("-r" "report output of passed tests" "-rFP"))) + (should (equal (aref (aref infix 1) 6) '("-w" "don't output warnings" "--disable-warnings"))) + (should (equal (aref (aref infix 1) 7) '("-n" "don't capture output" "--capture=no"))))))