Merge pull request #3437 from yan12125/fix-tests-on-mojave

Fix a failing test on macOS Mojave
This commit is contained in:
Thomas Kriechbaumer 2019-01-26 14:57:41 +01:00 committed by GitHub
commit 67aa1b63f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -1,4 +1,5 @@
import argparse
import platform
from unittest import mock
import pytest
@ -52,8 +53,11 @@ class TestProcessProxyOptions:
class TestProxyServer:
@skip_windows
@pytest.mark.skipif(platform.mac_ver()[0].split('.')[:2] == ['10', '14'],
reason='Skipping due to macOS Mojave')
def test_err(self):
# binding to 0.0.0.0:1 works without special permissions on Windows
# binding to 0.0.0.0:1 works without special permissions on Windows and
# macOS Mojave
conf = ProxyConfig(options.Options(listen_port=1))
with pytest.raises(Exception, match="Error starting proxy server"):
ProxyServer(conf)