diff --git a/python-dns-lexicon-tox-config.patch b/python-dns-lexicon-tox-config.patch new file mode 100644 index 0000000..dd22740 --- /dev/null +++ b/python-dns-lexicon-tox-config.patch @@ -0,0 +1,14 @@ +diff --git a/pyproject.toml b/pyproject.toml +index d17fecc..be0c6e6 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -126,8 +126,7 @@ extend-ignore = [ "E203", "E501" ] + envlist = [ "cover", "lint" , "mypy" ] + + [tool.tox.env_run_base] +-runner = "uv-venv-lock-runner" +-with_dev = true ++with_dev = false + uv_sync_flags = [ "--python={env_python}" ] # Fix until https://github.com/tox-dev/tox-uv/issues/110 is fixed + extras = [ "full" ] + setenv.PYTEST_ADDOPTS = "--numprocesses auto" diff --git a/python-dns-lexicon.spec b/python-dns-lexicon.spec index 91bbde6..f9337bf 100644 --- a/python-dns-lexicon.spec +++ b/python-dns-lexicon.spec @@ -27,6 +27,7 @@ License: MIT URL: %{forgeurl} # pypi releases don't contain necessary data to run the tests Source0: %{forgesource} +Patch: python-dns-lexicon-tox-config.patch BuildArch: noarch BuildRequires: python3-devel @@ -40,6 +41,7 @@ BuildRequires: python3-devel %if %{with tests} BuildRequires: python3-pytest BuildRequires: python3-pytest-vcr +BuildRequires: python3-pytest-xdist %endif @@ -169,7 +171,7 @@ sed -i '1d' src/lexicon/_private/cli.py # With tldextract 3.3.0+ we can use Fedora's public suffix list by running # tldextract --update --suffix_list_url "file:///usr/share/publicsuffix/public_suffix_list.dat" # prior to running the tests -TEST_SELECTOR="not AutoProviderTests and not NamecheapProviderTests and not NamecheapManagedProviderTests and not Route53Provider and not AliyunProviderTests and not AuroraProviderTests and not Route53ProviderTests and not GoDaddyProviderTests" +TEST_SELECTOR="not AutoProviderTests and not NamecheapProviderTests and not NamecheapManagedProviderTests and not Route53Provider and not AliyunProviderTests and not AuroraProviderTests and not Route53ProviderTests and not GoDaddyProviderTests and not test_client and not test_library" # lexicon providers which do not work in Fedora due to missing dependencies: # - SoftLayerProviderTests @@ -181,8 +183,7 @@ TEST_SELECTOR+=" and not DDNSProviderTests and not DuckdnsProviderTests and not # Miro HronĨok, 2020-09-11: # > I am afraid the %%tox macro can only work with "static" deps declaration, # > not with arbitrary installers invoked as commands, sorry about that. -# %pytest -v -k "${TEST_SELECTOR}" -# disable tests because it keeps wanting to download the public suffix list +%pytest -x -v -k "${TEST_SELECTOR}" -n auto --dist=loadfile --xfail-providers-with-missing-deps tests/ %endif %install