The command you are executing to start your tests is using POSIX shell syntax for setting the environment variable PWDEBUG
, but you seem to be executing it in a PowerShell.
The PowerShell syntax is a bit different. Try executing the following command instead:
$Env:PWDEBUG = 1; pytest -s test_saucedemo.py
See the question PowerShell: Setting an environment variable for a single command only.