Open gshif opened 5 years ago
Starting the work to python 3.
Branch https://github.com/influxdata/idpe/tree/test/litmus-python-3
Need to update dependencies and get all tests passing
The latest stable version of python (as of today) is 3.8.2
, the version 3.9
is in dev mode.
Link to the 3.8.2
python documentation: https://docs.python.org/3/whatsnew/index.html#whatsnew-index
Links defining a few key differences between python 3.8.x and 2.37:
https://jaxenter.com/differences-python-2-3-148432.html
https://www.guru99.com/python-2-vs-python-3.html
The latest version of pytest is 5.4.1
.
I could not find whether pytest 5.4.1
is (not) working with python 3.8.2
.
I can suggest to take major versions of pytest and python and go with it, i.e. pytest - 5.4.0
and python 3.8.0
Here are a few things to consider.
3.8.2
. The existing Dockerfile from idpe/litmus
can be used. Might as well use the version of python to be set to 5.4.1
.
I am not sure how to go about the rest of the modules that are being used, requests
for example.
The question is: at what point we want to go the upgraded version???acceptance
environment.test/litmus-python-3
. The work will be done in branches created from test/litmus-python-3
branch.[ ] cloud environment [ ] oss [ ] local dev
Docker error
INFO src.cloud.rest_api.smoke.test_smoke:conftest.py:1033 create_org() fixture : cleaning up tasks
INFO src.cloud.rest_api.smoke.test_smoke:conftest.py:1034 ----------------------------------------
_______________ ERROR at setup of TestSmoke.test_tasks_smoke[-] ________________
Fixture "reset_tasks" called directly. Fixtures are not meant to be called directly,
but are created automatically when test functions request them as parameters.
See https://docs.pytest.org/en/latest/fixture.html for more information about fixtures, and
https://docs.pytest.org/en/latest/deprecations.html#calling-fixtures-directly about how to update your code.
-------------------- generated xml file: /Litmus/result.xml --------------------
--------------- generated html file: file:///Litmus/report.html ----------------
======================== 2 warnings, 2 errors in 0.10s =========================
SAVING THE RESULTS OF THE TEST RUN IN INFLUXDB
+ EXIT_STATUS=1
+ rm -rf result/config
COPYING report.html TO result DIRECTORY
+ '[' -f report.html ']'
+ echo 'COPYING report.html TO result DIRECTORY'
+ cp report.html result
+ '[' -f result.xml ']'
+ echo 'COPYING result.xml TO result DIRECTORY'
+ cp result.xml result
COPYING result.xml TO result DIRECTORY
+ '[' -d assets ']'
+ echo 'COPYING assets DIRECTORY TO result DIRECTORY'
+ cp -r assets result
COPYING assets DIRECTORY TO result DIRECTORY
+ chown -R 10000:10000 result
+ chmod -R 777 result
+ '[' 1 -eq 0 ']'
+ PASSED=false
+ false
Add pytest source locally to litmus
Paired with Gershon and Dan. Fixed encoding and direct fixture calls. Ran test_smoke.py
and test_gateway_get_bucket.py
and they passed!