#!/usr/bin/env python3

import platform
import sys

import pytest

ARGS = [
    #'--pdb',
    #'--exitfirst',
]

if platform.system() == 'Windows':
    if 'idlelib' in sys.modules:
        ARGS.extend(['--capture=sys', '--color=no'])

sys.exit(pytest.main(ARGS + sys.argv[1:]))

@@ -17,16 +17,77 @@
 ython3%0A%0A
+%22%22%22Run the tests with https://pytest.org.%22%22%22%0A%0Aimport pathlib%0A
 import p
@@ -125,16 +125,47 @@
 st%0A%0A
+SELF = pathlib.Path(__file__)%0A%0A
 ARGS = %5B
 %0A   
@@ -160,21 +160,16 @@
 ARGS = %5B
-%0A    
 #'--pdb'
@@ -174,16 +174,20 @@
 b',%0A    
+  
+  
 #'--exit
@@ -193,17 +193,61 @@
 tfirst',
-%0A
+  # a.k.a. -x%0A        #'-W', 'error',%0A       
 %5D%0A%0Aif pl
@@ -278,16 +278,12 @@
 ows'
-:%0A    if
+ and
  'id
@@ -313,24 +313,16 @@
     
-    ARGS.extend(
+ARGS += 
 %5B'--
@@ -352,50 +352,136 @@
 no'%5D
-)%0A%0Asys.exit(pytest.main(ARGS + sys.argv%5B1:%5D
+%0A%0A%0Aprint('run', %5BSELF.name%5D + sys.argv%5B1:%5D)%0Aargs = ARGS + sys.argv%5B1:%5D%0A%0Aprint(f'pytest.main(%7Bargs!r%7D)')%0Asys.exit(pytest.main(args
 ))%0A

increase verbosity