bpo-30778: Skip test_bsddb3 on Windows XP by vstinner · Pull Request #2877 · python/cpython

@vstinner

@vstinner

@vstinner

PR closed then reopened to retry AppVeyor. Previously, AppVeyor failed with: "continuous-integration/appveyor/pr — AppVeyor was unable to build non-mergeable pull request".

zware

sys.argv.remove('silent')

# bpo-30778: test_bsddb3 crashs randomly on Windows XP
if hasattr(sys, 'getwindowsversion') and sys.getwindowsversion()[:2] <= (6, 0):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

6.0 was Vista which we don't want to skip, so < rather than <=.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, I know that, it's a mistake. It's now fixed.

@vstinner

zware

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could play code golf to get it down to (or beyond) if getattr(sys, 'getwindowsversion', lambda: (9,))()[:1] < (6,):, but this is fine as is :)

@vstinner

if getattr(sys, 'getwindowsversion', lambda: (9,))()[:1] < (6,):

Nice one, but I prefer my syntax ;-)