mirror of https://github.com/scrapy/scrapy.git
Disable tests based on mitmproxy while running on PyPy
This commit is contained in:
parent
477b9e2453
commit
3bf84af748
|
|
@ -41,13 +41,8 @@ sys.exit(mitmdump())
|
|||
'--ssl-insecure',
|
||||
],
|
||||
stdout=PIPE, env=get_testenv())
|
||||
line = self.proc.stdout.read().decode('utf-8')
|
||||
pattern = r'listening at http://([^:]+:\d+)'
|
||||
match = re.search(pattern, line)
|
||||
if not match:
|
||||
raise RuntimeError('Could not find {} in stdout line {}'
|
||||
.format(repr(pattern), repr(line)))
|
||||
host_port = match.group(1)
|
||||
line = self.proc.stdout.readline().decode('utf-8')
|
||||
host_port = re.search(r'listening at http://([^:]+:\d+)', line).group(1)
|
||||
address = 'http://%s:%s@%s' % (self.auth_user, self.auth_pass, host_port)
|
||||
return address
|
||||
|
||||
|
|
@ -64,6 +59,8 @@ def _wrong_credentials(proxy_url):
|
|||
|
||||
@skipIf(sys.version_info < (3, 5, 4),
|
||||
"requires mitmproxy < 3.0.0, which these tests do not support")
|
||||
@skipIf("pypy" in sys.executable,
|
||||
"mitmproxy does not support PyPy")
|
||||
class ProxyConnectTestCase(TestCase):
|
||||
|
||||
def setUp(self):
|
||||
|
|
|
|||
Loading…
Reference in New Issue