Running tests in Windows doesn't work properly
Categories
(Testing :: mozregression, defect)
Tracking
(Not tracked)
People
(Reporter: raysatiro, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36
Steps to reproduce:
I have a virtualenv set according to the README ('workon mozregression' to open the virtualenv) and so I run mozregression from the repo in that env. The tests do not complete without errors in that env. If I run check.py without python before it I get one error, and if I put python before it I get another.
pip install -e . && check.py --with-gui
I guess this has to do with self.pytest_args?
pip install -e . && python check.py --with-gui
This appears to run the tests. I don't see why they should be any different. It errors after reporting the tests that cannot find the file specified.
Actual results:
pip install -e . && check.py --with-gui
...
Traceback (most recent call last):
File "setup.py", line 75, in <module>
'Operating System :: OS Independent'
File "C:\Python27\lib\site-packages\setuptools_init_.py", line 143, in setup
return distutils.core.setup(**attrs)
File "C:\Python27\lib\distutils\core.py", line 151, in setup
dist.run_commands()
File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Python27\lib\site-packages\setuptools\command\test.py", line 228, in run
self.run_tests()
File "setup.py", line 23, in run_tests
errno = pytest.main(self.pytest_args)
File "C:\Python27\lib\site-packages_pytest\config_init_.py", line 60, in main
config = prepareconfig(args, plugins)
File "C:\Python27\lib\site-packages_pytest\config_init.py", line 179, in _prepareconfig
raise TypeError(msg.format(args, type(args)))
TypeError: args parameter expected to be a list or tuple of strings, got: ' tests' (type: <type 'str'>)
Running: |flake8 --max-line-length=100 mozregression tests setup.py 'X:\code\mozregression\mozregression\check.py'|
Running: |python setup.py test|
Traceback (most recent call last):
File "X:\code\mozregression\mozregression\check.py", line 60, in <module>
run(test_run_cmd + ['setup.py', 'test'])
File "X:\code\mozregression\mozregression\check.py", line 32, in run
check_call(cmd, **kwargs)
File "C:\Python27\lib\subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['python', 'setup.py', 'test']' returned non-zero exit status 1
pip install -e . && python check.py --with-gui
...
=========================== pytest-warning summary ============================
WC1 None passing a string to pytest.main() is deprecated, pass a list of arguments instead.
=============== 397 passed, 1 pytest-warnings in 20.05 seconds ================
Executing `'C:\Users\Internet\Envs\mozregression\Scripts\Scripts\flake8.exe' mozregui build.py tests`
ERROR: [Error 2] The system cannot find the file specified
Running: |flake8 --max-line-length=100 mozregression tests setup.py check.py|
Running: |python setup.py test|
Running: |python build.py test| in gui
Traceback (most recent call last):
File "check.py", line 62, in <module>
run(test_run_cmd + ['build.py', 'test'], cwd='gui')
File "check.py", line 32, in run
check_call(cmd, **kwargs)
File "C:\Python27\Lib\subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['python', 'build.py', 'test']' returned non-zero exit status 1
Expected results:
It should have worked without conflict. I don't know why I see these errors but they're not in the CI.
Comment 1•6 years ago
|
||
Hey, sorry for the late reply on this. Bug 1581633 should considerably simplify and modernizes things on Windows. I'm pretty sure whatever was causing the above issue will be fixed either by that or previous work to make mozregression work with python 3.
Description
•