mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-01 23:08:43 +01:00
tests: try to make tests pass on Python 3.13 on unix platforms (#10665)
This commit is contained in:
@@ -16,7 +16,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.12"
|
||||
python-version: "3.13"
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
|
||||
@@ -25,7 +25,7 @@ jobs:
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.12
|
||||
python-version: 3.13
|
||||
|
||||
- uses: astral-sh/setup-uv@v5
|
||||
- run: uv pip install --upgrade setuptools_scm twine --system
|
||||
|
||||
@@ -19,7 +19,7 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
pyv: ["3.12"]
|
||||
pyv: ["3.13"]
|
||||
plugin: ["dvc-s3"]
|
||||
|
||||
steps:
|
||||
|
||||
@@ -32,7 +32,7 @@ jobs:
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
python-version: '3.13'
|
||||
- uses: astral-sh/setup-uv@v5
|
||||
with:
|
||||
enable-cache: true
|
||||
@@ -55,7 +55,7 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
pyv: ["3.9", "3.10", "3.11", "3.12"]
|
||||
pyv: ["3.9", "3.10", "3.11", "3.12", "3.13"]
|
||||
include:
|
||||
- os: windows-latest
|
||||
pyv: "3.9"
|
||||
|
||||
@@ -27,6 +27,7 @@ classifiers = [
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.12",
|
||||
"Programming Language :: Python :: 3.13",
|
||||
]
|
||||
dynamic = ["version"]
|
||||
|
||||
@@ -172,6 +173,8 @@ filterwarnings = [
|
||||
"ignore:Deprecated call to `pkg_resources.declare_namespace: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",
|
||||
# TODO: investigate where we are not closing sqlite3.Connection
|
||||
"ignore:unclosed database.*sqlite3.Connection:ResourceWarning",
|
||||
]
|
||||
log_level = "debug"
|
||||
markers = [
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
import logging
|
||||
import time
|
||||
import traceback
|
||||
from datetime import datetime
|
||||
|
||||
import colorama
|
||||
import pytest
|
||||
@@ -22,11 +20,9 @@ colors = {
|
||||
|
||||
@pytest.fixture
|
||||
def dt(mocker):
|
||||
mocker.patch(
|
||||
"time.time",
|
||||
return_value=time.mktime(datetime(2020, 2, 2).timetuple()), # noqa: DTZ001
|
||||
)
|
||||
return "2020-02-02 00:00:00,000"
|
||||
dt_str = "2020-02-02 00:00:00,000"
|
||||
mocker.patch.object(formatter, "formatTime", return_value=dt_str)
|
||||
return dt_str
|
||||
|
||||
|
||||
class TestColorFormatter:
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
from pydoc import plainpager
|
||||
|
||||
import pytest
|
||||
|
||||
from dvc.env import DVC_PAGER
|
||||
@@ -70,8 +72,8 @@ def test_dvc_sets_some_options_on_less_if_less_env_defined(mocker, monkeypatch,
|
||||
assert find_pager() == "less --RAW-CONTROL-CHARS --chop-long-lines"
|
||||
|
||||
|
||||
def test_make_pager_when_no_pager_found(mocker, monkeypatch):
|
||||
assert make_pager(None).__name__ == "plainpager"
|
||||
def test_make_pager_when_no_pager_found():
|
||||
assert make_pager(None) is plainpager
|
||||
|
||||
|
||||
def test_pager(mocker, monkeypatch):
|
||||
|
||||
Reference in New Issue
Block a user