Skip to content

Commit

Permalink
Remove no longer valid tests for config_settings and editable installs
Browse files Browse the repository at this point in the history
  • Loading branch information
abravalheri committed Oct 13, 2023
1 parent d407d7e commit 5c7e61d
Showing 1 changed file with 1 addition and 26 deletions.
27 changes: 1 addition & 26 deletions setuptools/tests/test_build_meta.py
Expand Up @@ -700,25 +700,6 @@ def _assert_link_tree(self, parent_dir):
for file in files:
assert file.is_symlink() or os.stat(file).st_nlink > 0

@pytest.mark.filterwarnings("ignore::setuptools.SetuptoolsDeprecationWarning")
# Since the backend is running via a process pool, in some operating systems
# we may have problems to make assertions based on warnings/stdout/stderr...
# So the best is to ignore them for the time being.
def test_editable_with_global_option_still_works(self, tmpdir_cwd):
"""The usage of --global-option is now discouraged in favour of --build-option.
This is required to make more sense of the provided scape hatch and align with
previous pip behaviour. See pypa/setuptools#1928.
"""
path.build({**self._simple_pyproject_example, '_meta': {}})
build_backend = self.get_build_backend()
assert not Path("build").exists()

cfg = {"--global-option": ["--mode", "strict"]}
build_backend.prepare_metadata_for_build_editable("_meta", cfg)
build_backend.build_editable("temp", cfg, "_meta")

self._assert_link_tree(next(Path("build").glob("__editable__.*")))

def test_editable_without_config_settings(self, tmpdir_cwd):
"""
Sanity check to ensure tests with --mode=strict are different from the ones
Expand All @@ -733,13 +714,7 @@ def test_editable_without_config_settings(self, tmpdir_cwd):
build_backend.build_editable("temp")
assert not Path("build").exists()

@pytest.mark.parametrize(
"config_settings",
[
{"--build-option": ["--mode", "strict"]},
{"editable-mode": "strict"},
],
)
@pytest.mark.parametrize("config_settings", [{"editable-mode": "strict"}])
def test_editable_with_config_settings(self, tmpdir_cwd, config_settings):
path.build({**self._simple_pyproject_example, '_meta': {}})
assert not Path("build").exists()
Expand Down

0 comments on commit 5c7e61d

Please sign in to comment.