mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-01 23:08:43 +01:00
tests: lazy tpi imports, ignore deprecation warning from setuptools (#9362)
This commit is contained in:
@@ -149,6 +149,8 @@ filterwarnings = [
|
||||
# and https://github.com/celery/celery/issues/7528
|
||||
# drop when celery==5.3 && kombu==5.3 releases
|
||||
"ignore:SelectableGroups dict interface is deprecated:DeprecationWarning",
|
||||
# tpi imports pkg_resources
|
||||
"ignore:pkg_resources is deprecated as an API:DeprecationWarning",
|
||||
# see https://github.com/networkx/networkx/issues/5723.
|
||||
"ignore:nx.nx_pydot.* depends on the pydot package, which has.*known issues and is not actively maintained:DeprecationWarning",
|
||||
# remove when new version of pytest-cov gets released
|
||||
|
||||
@@ -2,7 +2,6 @@ import os
|
||||
import textwrap
|
||||
|
||||
import pytest
|
||||
import tpi
|
||||
|
||||
from dvc.cli import main
|
||||
from dvc.ui import ui
|
||||
@@ -109,6 +108,8 @@ def test_machine_list(tmp_dir, dvc, capsys):
|
||||
|
||||
|
||||
def test_machine_rename_success(tmp_dir, scm, dvc, machine_config, capsys, mocker):
|
||||
import tpi
|
||||
|
||||
config_file = tmp_dir / ".dvc" / "config"
|
||||
|
||||
mocker.patch.object(
|
||||
@@ -147,6 +148,8 @@ def test_machine_rename_exist(tmp_dir, scm, dvc, caplog):
|
||||
|
||||
|
||||
def test_machine_rename_error(tmp_dir, scm, dvc, machine_config, caplog, mocker):
|
||||
import tpi
|
||||
|
||||
config_file = tmp_dir / ".dvc" / "config"
|
||||
os.makedirs(tmp_dir / ".dvc" / "tmp" / "machine" / "terraform" / "foo")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user