diff options
author | 2022-12-25 20:24:06 -0800 | |
---|---|---|
committer | 2022-12-26 19:27:25 +0200 | |
commit | 4cce9a19dcbe670a676af89c2362f90411c5c796 (patch) | |
tree | a58654bdb3528b4ffd741778c3598ecccfec63eb /tests | |
parent | Throw an exception (py side) for any EBD var starting with '_' (diff) | |
download | pkgcore-4cce9a19dcbe670a676af89c2362f90411c5c796.tar.gz pkgcore-4cce9a19dcbe670a676af89c2362f90411c5c796.tar.bz2 pkgcore-4cce9a19dcbe670a676af89c2362f90411c5c796.zip |
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 <ferringb@gmail.com>
Closes: https://github.com/pkgcore/pkgcore/pull/387
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ebuild/test_portage_conf.py | 7 |
1 files changed, 1 insertions, 6 deletions
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): |