Re: [OE-core] [PATCH 03/30] selftest/cases/package: Call parent setUpClass method
On Wed, 2017-07-12 at 10:44 -0500, Aníbal Limón wrote: > > On 07/12/2017 01:51 AM, Patrick Ohly wrote: > > On Tue, 2017-07-11 at 15:23 -0500, Aníbal Limón wrote: > >> def setUpClass(cls): > >> +super(VersionOrdering, cls).setUpClass() > >> + > > > > In Python3 one can simply use super().setUpClass(). > > > > Not sure whether that's worth a V2 by itself. There's also plenty of > > other code outside of this patch which could be simplified like this. > > Yes may be is better to send a patch changing all the cases to the new > py3 form. Definitely not something for this patch series. However, I think new code should avoid the more complex form whenever possible. So if you do a V2, then I'd prefer to have super() in your patch. -- Best Regards, Patrick Ohly The content of this message is my personal opinion only and although I am an employee of Intel, the statements I make here in no way represent Intel's position on the issue, nor am I authorized to speak on behalf of Intel on this matter. -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH 03/30] selftest/cases/package: Call parent setUpClass method
On 07/12/2017 01:51 AM, Patrick Ohly wrote: > On Tue, 2017-07-11 at 15:23 -0500, Aníbal Limón wrote: >> def setUpClass(cls): >> +super(VersionOrdering, cls).setUpClass() >> + > > In Python3 one can simply use super().setUpClass(). > > Not sure whether that's worth a V2 by itself. There's also plenty of > other code outside of this patch which could be simplified like this. Yes may be is better to send a patch changing all the cases to the new py3 form. Anibal > -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH 03/30] selftest/cases/package: Call parent setUpClass method
On Tue, 2017-07-11 at 15:23 -0500, Aníbal Limón wrote: > def setUpClass(cls): > +super(VersionOrdering, cls).setUpClass() > + In Python3 one can simply use super().setUpClass(). Not sure whether that's worth a V2 by itself. There's also plenty of other code outside of this patch which could be simplified like this. -- Best Regards, Patrick Ohly The content of this message is my personal opinion only and although I am an employee of Intel, the statements I make here in no way represent Intel's position on the issue, nor am I authorized to speak on behalf of Intel on this matter. -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 03/30] selftest/cases/package: Call parent setUpClass method
Since config paths are now passed in Test context the setUpClass method is expected to be call. Signed-off-by: Aníbal Limón--- meta/lib/oeqa/selftest/cases/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/lib/oeqa/selftest/cases/package.py b/meta/lib/oeqa/selftest/cases/package.py index 5b9a6d15851..b07d6ed0abe 100644 --- a/meta/lib/oeqa/selftest/cases/package.py +++ b/meta/lib/oeqa/selftest/cases/package.py @@ -17,6 +17,8 @@ class VersionOrdering(OESelftestTestCase): @classmethod def setUpClass(cls): +super(VersionOrdering, cls).setUpClass() + # Build the tools we need and populate a sysroot bitbake("dpkg-native opkg-native rpm-native python3-native") bitbake("build-sysroots -c build_native_sysroot") -- 2.11.0 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core