[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Python related autopkgtest anti-pattern



I'm currently reviewing some of the autopkgtest regressions that are currently 
blocking python3-defaults with python3.8 as the default python3 from 
migrating.

With the current state of the environment being used for autopkgtest it is 
quite common for python3.7 to be present in the environment even if it's not 
explicitly required by a dependency.  As a result, I seen many failures where 
the test attempts to loop through python3 versions (a good thing) based on 
what versions are installed (bad thing).

We want the tests to run against all versions, but the way to do that is to 
have your test depend on python3-all (to make sure that all supported versions 
are installed) and then use the -s flag for py3versions vice -i.  So (in one 
common pattern) this:

for py in $(py3versions -i); do

changes to:

for py in $(py3versions -s); do

Makes all the difference in the world.  I've fixed three today.  If you care for 
a relevant package, please check.  The future pain you save may be your own.

Scott K

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: