Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
168 changes: 1 addition & 167 deletions poetry.lock

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ pre-commit = ">=2.10"

[tool.poetry.group.test.dependencies]
coverage = ">=7.2.0"
deepdiff = ">=6.3"
# test_clone_with_lfs_files relies on being able to use
# locally cloned LFS stores, which requires dulwich>=1.2.1
dulwich = ">=1.2.1"
Expand Down
4 changes: 1 addition & 3 deletions tests/config/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

import pytest

from deepdiff.diff import DeepDiff

from poetry.config.config import Config
from poetry.config.config import PackageFilterPolicy
from poetry.config.config import boolean_normalizer
Expand Down Expand Up @@ -197,4 +195,4 @@ def test_config_get_from_environment_variable_build_config_settings(
if invalid:
assert configured_value is None
else:
assert not DeepDiff(configured_value, json.loads(value))
assert configured_value == json.loads(value)
22 changes: 8 additions & 14 deletions tests/console/commands/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

import pytest

from deepdiff.diff import DeepDiff
from poetry.core.pyproject.exceptions import PyProjectError

from poetry.config.config_source import ConfigSource
Expand Down Expand Up @@ -655,7 +654,7 @@ def test_config_installer_binary_filter_config(
tester.execute(f"{setting} '{value}'")

config = Config.create(reload=True)
assert not DeepDiff(config.get(setting), expected, ignore_order=True)
assert sorted(config.get(setting)) == sorted(expected)


def test_config_solver_lazy_wheel(
Expand Down Expand Up @@ -824,27 +823,22 @@ def test_config_installer_build_config_settings(
value = {"CC": "gcc", "--build-option": ["--one", "--two"]}

tester.execute(f"{config_key} '{json.dumps(value)}'")
assert not DeepDiff(config.config_source.get_property(config_key), value)
assert config.config_source.get_property(config_key) == value

value_two = {"CC": "g++"}
tester.execute(f"{config_key} '{json.dumps(value_two)}'")
assert not DeepDiff(
config.config_source.get_property(config_key), {**value, **value_two}
)
assert config.config_source.get_property(config_key) == {**value, **value_two}

value_three = {
"--build-option": ["--three", "--four"],
"--package-option": ["--name=foo"],
}
tester.execute(f"{config_key} '{json.dumps(value_three)}'")
assert not DeepDiff(
config.config_source.get_property(config_key),
{
**value,
**value_two,
**value_three,
},
)
assert config.config_source.get_property(config_key) == {
**value,
**value_two,
**value_three,
}

tester.execute(f"{config_key} --unset")

Expand Down
14 changes: 6 additions & 8 deletions tests/masonry/builders/test_editable_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import pytest

from cleo.io.null_io import NullIO
from deepdiff.diff import DeepDiff
from poetry.core.constraints.version import Version
from poetry.core.masonry.metadata import Metadata
from poetry.core.packages.package import Package
Expand Down Expand Up @@ -167,13 +166,12 @@ def test_builder_installs_proper_files_for_standard_packages(
assert dist_info.joinpath("RECORD").exists()
assert dist_info.joinpath("direct_url.json").exists()

assert not DeepDiff(
{
"dir_info": {"editable": True},
"url": simple_poetry.file.path.parent.as_uri(),
},
json.loads(dist_info.joinpath("direct_url.json").read_text(encoding="utf-8")),
)
assert json.loads(
dist_info.joinpath("direct_url.json").read_text(encoding="utf-8")
) == {
"dir_info": {"editable": True},
"url": simple_poetry.file.path.parent.as_uri(),
}

assert dist_info.joinpath("INSTALLER").read_text(encoding="utf-8") == "poetry"
assert (
Expand Down
3 changes: 1 addition & 2 deletions tests/test_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import pytest

from cleo.io.buffered_io import BufferedIO
from deepdiff.diff import DeepDiff
from packaging.utils import canonicalize_name
from poetry.core.constraints.version import Version
from poetry.core.constraints.version import parse_constraint
Expand Down Expand Up @@ -188,7 +187,7 @@ def test_create_pyproject_from_package(
if not expected[section]:
expected.pop(section)

assert not DeepDiff(expected, result)
assert result == expected


def test_create_poetry_with_packages_and_includes(
Expand Down
5 changes: 2 additions & 3 deletions tests/utils/env/test_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import packaging.tags
import pytest

from deepdiff.diff import DeepDiff
from installer.utils import SCHEME_NAMES

from poetry.factory import Factory
Expand Down Expand Up @@ -542,14 +541,14 @@ def mock_is_dir_writable(path: Path, create: bool = False) -> bool:


def test_env_scheme_dict_returns_original_when_writable(system_env: SystemEnv) -> None:
assert not DeepDiff(system_env.scheme_dict, system_env.paths, ignore_order=True)
assert system_env.scheme_dict == system_env.paths


def test_env_scheme_dict_returns_modified_when_read_only(
system_env_read_only: SystemEnv,
) -> None:
scheme_dict = system_env_read_only.scheme_dict
assert DeepDiff(scheme_dict, system_env_read_only.paths, ignore_order=True)
assert scheme_dict != system_env_read_only.paths

paths = system_env_read_only.paths
assert all(
Expand Down
14 changes: 4 additions & 10 deletions tests/utils/test_dependency_specification.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

import pytest

from deepdiff.diff import DeepDiff

from poetry.inspection.info import PackageInfo
from poetry.utils.dependency_specification import RequirementsParser

Expand Down Expand Up @@ -140,7 +138,7 @@
"name": "name",
"markers": 'python_version == "2.7"',
"url": "http://foo.com",
"extras": ["fred", "bar"],
"extras": ["bar", "fred"],
},
),
),
Expand Down Expand Up @@ -182,11 +180,7 @@ def _mock(self: Path) -> bool:
return_value=PackageInfo(name="demo", version="0.1.2"),
)

assert any(
not DeepDiff(
RequirementsParser(artifact_cache=artifact_cache).parse(requirement),
specification,
ignore_order=True,
)
for specification in expected_variants
assert (
RequirementsParser(artifact_cache=artifact_cache).parse(requirement)
in expected_variants
)
Loading