From 4cce9a19dcbe670a676af89c2362f90411c5c796 Mon Sep 17 00:00:00 2001 From: Brian Harring Date: Sun, 25 Dec 2022 20:24:06 -0800 Subject: Ignore both empty and non-existant repos.conf files. Whilst this should probably matter, all reporting pathways I know of involve "don't yell at the user" this it's probably not optimal to have pathways that "yell at the user". Closes: https://github.com/pkgcore/pkgcore/issues/365 Signed-off-by: Brian Harring Closes: https://github.com/pkgcore/pkgcore/pull/387 Signed-off-by: Arthur Zamarin --- tests/ebuild/test_portage_conf.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/ebuild/test_portage_conf.py b/tests/ebuild/test_portage_conf.py index 395373b8..edb3d89b 100644 --- a/tests/ebuild/test_portage_conf.py +++ b/tests/ebuild/test_portage_conf.py @@ -5,12 +5,12 @@ import stat import textwrap import pytest +from snakeoil.osutils import pjoin from pkgcore import const from pkgcore import exceptions as base_errors from pkgcore.config import errors as config_errors from pkgcore.ebuild.portage_conf import PortageConfig -from snakeoil.osutils import pjoin load_make_conf = PortageConfig.load_make_conf load_repos_conf = PortageConfig.load_repos_conf @@ -78,11 +78,6 @@ class TestReposConf: with pytest.raises(base_errors.PermissionDenied): load_repos_conf(path) - def test_blank_file(self, tmp_path, caplog): - (path := tmp_path / "file").touch() - load_repos_conf(path) - assert "file is empty" in caplog.text - def test_garbage_file(self, tmp_path): (path := tmp_path / "file").write_bytes(binascii.b2a_hex(os.urandom(10))) with pytest.raises(config_errors.ConfigurationError): -- cgit v1.2.3-65-gdbad