mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 11:50:54 +07:00
DS-4784 Create tests for Python part of tables support
Exclude polars from testing in Python2.7 Exclude polars for testing in Python 2.7 in advance from test_common.py GitOrigin-RevId: 692d6bacb365665e618d650b7b739e0d86372ad1
This commit is contained in:
committed by
intellij-monorepo-bot
parent
7a4939dead
commit
a4a305c957
@@ -1,3 +1,5 @@
|
||||
[pytest]
|
||||
addopts=-vv
|
||||
python_files = test_*.py
|
||||
python_files = test_*.py
|
||||
# If you want to exclude some tests from running in Python 2.7 you should use the corresponding decorator
|
||||
# @pytest.mark.skipif(sys.version_info < (3, 0), reason="Not supported in Python 2.7")
|
||||
@@ -8,6 +8,7 @@ We check:
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
import pytest
|
||||
import inspect
|
||||
import importlib
|
||||
@@ -21,6 +22,9 @@ def setup_tables_modules():
|
||||
for _, _, files in os.walk(pydevd_tables_path):
|
||||
for file in files:
|
||||
if file.endswith('py') and file != '__init__.py':
|
||||
if sys.version_info < (3, 0) and 'polars' in file:
|
||||
# we don't need to test polars for python 2.7
|
||||
continue
|
||||
tables_files.append(file)
|
||||
module_name = '_pydevd_bundle.tables.' + file.replace('.py', '')
|
||||
tables_modules.append(importlib.import_module(module_name))
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
[tox]
|
||||
envlist = python2.7, python3.8, python3.9
|
||||
isolated_build = true
|
||||
isolated_build = True
|
||||
skipsdist = True
|
||||
|
||||
[testenv]
|
||||
description = run unit tests in 3 different Python versions
|
||||
deps =
|
||||
pytest
|
||||
teamcity-messages
|
||||
pandas
|
||||
polars
|
||||
IPython
|
||||
commands =
|
||||
pytest -s
|
||||
python2.7: pytest teamcity-messages pandas IPython
|
||||
python3.8: pytest teamcity-messages pandas IPython polars
|
||||
python3.9: pytest teamcity-messages pandas IPython polars
|
||||
|
||||
whitelist_externals = pytest
|
||||
commands = pytest -s
|
||||
|
||||
setenv = PYTHONPATH = {toxinidir}/../third_party/thriftpy
|
||||
passenv = TEAMCITY_VERSION
|
||||
Reference in New Issue
Block a user