tests: add optional output for Python 2.7 deprecation
We already had one of these a few lines above. We need it here as
well.
Differential Revision: https://phab.mercurial-scm.org/D6203
setup: use raw string for regular expression
Otherwise Python 3.8 complains about the backslash.
Differential Revision: https://phab.mercurial-scm.org/D6202