Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some tests fail on Windows #4

Closed
nehaljwani opened this issue Jun 18, 2017 · 1 comment
Closed

Some tests fail on Windows #4

nehaljwani opened this issue Jun 18, 2017 · 1 comment

Comments

@nehaljwani
Copy link
Contributor

> python src\tests\portpicker_test.py
sE...s.E.E.
======================================================================
ERROR: testIsPortFree (__main__.PickUnusedPortTest)
This might be flaky unless this test is run with a portserver.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "src\tests\portpicker_test.py", line 167, in testIsPortFree
    sock.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_V6ONLY,
AttributeError: 'module' object has no attribute 'IPPROTO_IPV6'

======================================================================
ERROR: testPidDefaultsToOwnPid (__main__.PickUnusedPortTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "src\tests\portpicker_test.py", line 91, in testPidDefaultsToOwnPid
    port = portpicker.get_port_from_port_server('portserver')
  File "D:\nwani\m2u\envs\scratch\lib\site-packages\portpicker.py", line 191, in get_port_from_port_server
    sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
AttributeError: 'module' object has no attribute 'AF_UNIX'

======================================================================
ERROR: testSendsPidToPortServer (__main__.PickUnusedPortTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "src\tests\portpicker_test.py", line 82, in testSendsPidToPortServer
    port = portpicker.get_port_from_port_server('portserver', pid=1234)
  File "D:\nwani\m2u\envs\scratch\lib\site-packages\portpicker.py", line 191, in get_port_from_port_server
    sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
AttributeError: 'module' object has no attribute 'AF_UNIX'

----------------------------------------------------------------------
Ran 11 tests in 1.226s

FAILED (errors=3, skipped=2)
@nehaljwani
Copy link
Contributor Author

nehaljwani added a commit to nehaljwani/python_portpicker that referenced this issue Apr 30, 2018
nehaljwani added a commit to nehaljwani/python_portpicker that referenced this issue May 2, 2018
gpshead pushed a commit that referenced this issue May 2, 2018
* Proceed with defaults if socket.IPPROTO_IPV6 is not exported

This patch adds a way around: https://bugs.python.org/issue29515

* Add fallback to AF_INET if AF_UNIX is unavailable

xref: #4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant