I am trying to run pytest with coverage option (i.e. –cov) with python 3.9, it is not working, but when I run on Python 3.6 or 3.7 version it works.
python -m pytest –cov=my_package –cov-report=xml
Error poped out and please refer screenshot as well:
1″/appl/jenkinsslave/workspace/r_qube_integeration_with_jenkins@tmp/venv/lib/python3.9/site-packages/coverage/sqldata.py”, line 16, in
import sqlite3
File “/usr/local/lib/python3.9/sqlite3/init.py”, line 23, in
from sqlite3.dbapi2 import *
File “/usr/local/lib/python3.9/sqlite3/dbapi2.py”, line 27, in
from _sqlite3 import *
ModuleNotFoundError: No module named ‘_sqlite3’
[]