mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-04 06:20:17 +01:00
client/tests: skip cloud-setup test for older python
The test uses subprocess.Popen()'s "pass_fd" argument. That is only
available since Python 3.2. Possibly it could be solved differently, but
that is not implemented. Instead, skip the test.
Also, socket.socket.set_inheritable() is Python 3.4. But presumably
we don't need it.
Fixes: d89d42bf23 ('tests/client: test nm-cloud-setup')
This commit is contained in:
parent
9ed802b0c2
commit
15c25e91f5
1 changed files with 4 additions and 0 deletions
|
|
@ -2146,6 +2146,10 @@ class TestNmCloudSetup(TestNmClient):
|
|||
if pexpect is None:
|
||||
raise unittest.SkipTest("pexpect not available")
|
||||
|
||||
if tuple(sys.version_info[0:2]) < (3, 2):
|
||||
# subprocess.Popen()'s "pass_fd" argument requires at least Python 3.2.
|
||||
raise unittest.SkipTest("This test requires at least Python 3.2")
|
||||
|
||||
s = socket.socket()
|
||||
s.set_inheritable(True)
|
||||
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue