Gentoo Archives: gentoo-portage-dev

From: Brian Dolbec <dolsen@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH 4/6] tests: Fix running on installed copy of Portage
Date: Fri, 22 Aug 2014 22:20:27
Message-Id: 20140822151912.62d83ac0.dolsen@gentoo.org
In Reply to: [gentoo-portage-dev] [PATCH 4/6] tests: Fix running on installed copy of Portage by "Michał Górny"
1 On Thu, 21 Aug 2014 22:19:42 +0200
2 Michał Górny <mgorny@g.o> wrote:
3
4 > ---
5 > pym/portage/tests/__init__.py | 20
6 > ++++++++++++++++++ pym/portage/tests/dbapi/test_portdb_cache.py
7 > | 5 ++--- pym/portage/tests/emerge/test_emerge_slot_abi.py | 7
8 > +++---- pym/portage/tests/emerge/test_simple.py | 26
9 > ++++++++++++------------
10 > pym/portage/tests/lint/test_compile_modules.py | 10 +++++----
11 > pym/portage/tests/lint/test_import_modules.py | 8 ++++++--
12 > pym/portage/tests/repoman/test_simple.py | 8 +++++---
13 > pym/portage/tests/resolver/ResolverPlayground.py | 8 +++++---
14 > pym/portage/tests/util/test_getconfig.py | 5 ++--- 9 files
15 > changed, 62 insertions(+), 35 deletions(-)
16 >
17
18 diff --git a/pym/portage/tests/util/test_getconfig.py
19 > b/pym/portage/tests/util/test_getconfig.py index e5fd60f..16f415c
20 > 100644 --- a/pym/portage/tests/util/test_getconfig.py
21 > +++ b/pym/portage/tests/util/test_getconfig.py
22 > @@ -3,6 +3,7 @@
23 >
24 > import tempfile
25 >
26 > +import portage
27 > from portage import os
28 > from portage import shutil
29 > from portage import _unicode_encode
30 > @@ -26,9 +27,7 @@ class GetConfigTestCase(TestCase):
31 > }
32 >
33 > def testGetConfig(self):
34 > -
35 > - make_globals_file = os.path.join(PORTAGE_BASE_PATH,
36 > - 'cnf', 'make.globals')
37 > + make_globals_file = os.path.join(self.cnf_path,
38 > "make.globals") d = getconfig(make_globals_file)
39 > for k, v in self._cases.items():
40 > self.assertEqual(d[k], v)
41
42 Why was "import portage" added but not used anywhere in additional code?
43
44
45 --
46 Brian Dolbec <dolsen>

Replies