aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBrian Harring <ferringb@gmail.com>2023-01-10 01:42:00 -0800
committerArthur Zamarin <arthurzam@gentoo.org>2023-01-17 22:46:03 +0200
commite5e79c093c50bfaf7ec667fe0ded72efe972d1c3 (patch)
tree547b3e906afeed23782fbb0e19a20e1a7a7840d8 /tests
parentportage_conf: add support for make.profile as directory (diff)
downloadpkgcore-e5e79c093c50bfaf7ec667fe0ded72efe972d1c3.tar.gz
pkgcore-e5e79c093c50bfaf7ec667fe0ded72efe972d1c3.tar.bz2
pkgcore-e5e79c093c50bfaf7ec667fe0ded72efe972d1c3.zip
refactor(sync): hide FD passing as an internal thing.
Effectively, add '_spawn' and '_spawn_interactive' to the base class, and expect consumers to invoke the appropriate one. This addition doesn't fully fix the fundamental lack of an observer (or log) based approach to getting info out of syncers, but it at least hides some of the internals so the syncer classes can do things like knowing what the correct encoding is for stdout, thus being able to write their own messages to it. TL;DR: This subsystem's interaction w/ CLI (and used as a library) needs rewriting, this just reduces that problem when we visit it. Signed-off-by: Brian Harring <ferringb@gmail.com> Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/scripts/test_pmaint.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/scripts/test_pmaint.py b/tests/scripts/test_pmaint.py
index 63846456..c9af122f 100644
--- a/tests/scripts/test_pmaint.py
+++ b/tests/scripts/test_pmaint.py
@@ -1,6 +1,9 @@
from functools import partial
from io import BytesIO
+from snakeoil.formatters import PlainTextFormatter
+from snakeoil.mappings import AttrAccessible
+
from pkgcore.config import basics
from pkgcore.config.hint import ConfigHint
from pkgcore.ebuild.cpv import CPV
@@ -9,8 +12,6 @@ from pkgcore.repository import syncable, util
from pkgcore.scripts import pmaint
from pkgcore.sync import base
from pkgcore.test.scripts.helpers import ArgParseMixin
-from snakeoil.formatters import PlainTextFormatter
-from snakeoil.mappings import AttrAccessible
Options = AttrAccessible
@@ -96,7 +97,7 @@ class FakeSyncer(base.Syncer):
super().__init__(*args, **kwargs)
self.synced = False
- def _sync(self, verbosity, output_fd, **kwds):
+ def _sync(self, verbosity, **kwds):
self.synced = True
return self.succeed