[Avocado-devel] Deprecating "standalone" jobs

Cleber Rosa crosa at redhat.com
Tue May 19 19:51:25 UTC 2020


In an effort to keep the Avocado code base lean and clean, we're
looking at features that have a negative impact in the architecture
and future maintenance, and can be replaced by other more solid

Among those is the "standalone job" feature, which has to do with
the ability to embed a job execution within a test file.  When you
write code such as:

   #!/usr/bin/env python
   from avocado import main
   from avocado import Test

   class PassTest(Test):
      def test(self):

   if __name__ == "__main__":

The `main()` call is really an instantiation and execution of a
`avocado.core.Job`.  While it looks neat here, the implementation
is awkward.  The idea is to deprecate this feature, in favor of
an opposite approach: job files (using the soon to be supported
Job API), with embedded tests.  For an example, please refer to:


Besides a heads up, this is a call for users and use cases that
may justify *not* deprecating and removing this.

- Cleber.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/avocado-devel/attachments/20200519/40ebdb24/attachment.sig>

More information about the Avocado-devel mailing list