From 345c475efe2dee94ee327d99f729c8274b1f6047 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Sun, 22 May 2022 08:40:32 +0200
Subject: [PATCH] Pass --disable-pip-version-check in tests

Pass `--disable-pip-version-check` when running pip from the test suite.
In the best case, these checks are unnecessary and in the worst, they
cause tests to fail by emitting warnings.

Fixes https://github.com/pypa/pip/issues/11114
---
 tests/lib/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/lib/__init__.py b/tests/lib/__init__.py
index c8d68fea9..d64cf1d53 100644
--- a/tests/lib/__init__.py
+++ b/tests/lib/__init__.py
@@ -682,7 +682,7 @@ class PipTestEnvironment(TestFileEnvironment):
             kwargs["allow_stderr_warning"] = True
         if use_module:
             exe = "python"
-            args = ("-m", "pip") + args
+            args = ("-m", "pip", "--disable-pip-version-check") + args
         else:
             exe = "pip"
         return self.run(exe, *args, **kwargs)
-- 
2.35.1

