All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Julien Olivain <ju.o@free.fr>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/2] support/testing: test_audio_codec_base.py: new helper class
Date: Wed, 7 Aug 2024 21:35:58 +0200	[thread overview]
Message-ID: <20240807213558.4abc7e85@windsurf> (raw)
In-Reply-To: <bad5f692bff295e22fdebc46c043a661@free.fr>

Hello Julien,

On Fri, 21 Jun 2024 14:40:20 +0000
Julien Olivain <ju.o@free.fr> wrote:

> Renaming the "test_audio_codec_base.py" file to "audio_codec_base.py",
> and the "TestAudioCodecBase" class to "AudioCodecBase" will not
> prevent the test to be discovered by Nose2. This will prevent the file
> and class to be selected at first. But if "__test__ = False" is not
> present, it will still be indirectly loaded from the TestLame
> import. This can be seen by adding "--log-level debug" in nose2
> arguments.
> 
> While I do agree we could rename the file and class to better show the
> intent this is an "abstract" class which does not include a test, I
> think the "__test__ = False" needs to stay here to really prevent it
> being loaded.

Apparently, not. Look at:

  https://patchwork.ozlabs.org/project/buildroot/patch/f57167b1488b3c5ad76362dd8bca1b12d281aa19.1696522656.git.yann.morin.1998@free.fr/

proposed by Yann. The abstract class doesn't start with Test, it
doesn't have __test__ = false, and it isn't considered as a test by
nose2.

Now, look at:

  https://patchwork.ozlabs.org/project/buildroot/patch/33ee4b08c20f9c4566cfe82c648f01599cab70b5.1696522656.git.yann.morin.1998@free.fr/

which uses multiple inheritance, doesn't defined __test__ = true, and
is properly considered by nose2.

Could you have a look as to why this pattern wouldn't work for your
audio codec situation?

Thanks a lot,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2024-08-07 19:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-15  9:16 [Buildroot] [PATCH 1/2] support/testing: test_audio_codec_base.py: new helper class Julien Olivain
2024-06-15  9:16 ` [Buildroot] [PATCH 2/2] support/testing: add lame runtime test Julien Olivain
2024-06-15 18:09 ` [Buildroot] [PATCH 1/2] support/testing: test_audio_codec_base.py: new helper class Yann E. MORIN
2024-06-21 14:40   ` Julien Olivain
2024-08-07 19:35     ` Thomas Petazzoni via buildroot [this message]
2024-08-07 21:09       ` Julien Olivain
2024-08-07 21:20         ` Thomas Petazzoni via buildroot
2024-08-06 21:24 ` Thomas Petazzoni via buildroot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240807213558.4abc7e85@windsurf \
    --to=buildroot@buildroot.org \
    --cc=ju.o@free.fr \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=yann.morin.1998@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.