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

Unit test test_exceptions fails on darwin #1268

Open
skatromb opened this issue Feb 6, 2025 · 0 comments
Open

Unit test test_exceptions fails on darwin #1268

skatromb opened this issue Feb 6, 2025 · 0 comments
Labels

Comments

@skatromb
Copy link
Contributor

skatromb commented Feb 6, 2025

def test_exceptions():
        assert E1 == E2 == E3
>       with IPRoute() as ipr:

test_unit/test_entry_points/test_basic.py:9:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../lib/python3.13/site-packages/pyroute2/iproute/linux.py:2580: in init
    self.asyncore.event_loop.run_until_complete(
/Users/skatromb/.asdf/installs/python/3.13.1/lib/python3.13/asyncio/base_events.py:720: in run_until_complete
    return future.result()
../../lib/python3.13/site-packages/pyroute2/netlink/core.py:248: in ensure_socket
    self.local.socket = self.setup_socket()
../../lib/python3.13/site-packages/pyroute2/netlink/nlsocket.py:291: in setup_socket
    sock = netns.create_socket(
../../lib/python3.13/site-packages/pyroute2/netns/__init__.py:417: in create_socket
    return socket.socket(family, socket_type, proto)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <socket.socket fd=-1, family=0, type=0, proto=0>, family = 16, type = <SocketKind.SOCK_DGRAM: 2>, proto = 0, fileno = None

    def __init__(self, family=-1, type=-1, proto=-1, fileno=None):
        # For user code address family and type values are IntEnum members, but
        # for the underlying _socket.socket they're just integers. The
        # constructor of _socket.socket converts the given argument to an
        # integer automatically.
        if fileno is None:
            if family == -1:
                family = AF_INET
            if type == -1:
                type = SOCK_STREAM
            if proto == -1:
                proto = 0
>       _socket.socket.__init__(self, family, type, proto, fileno)
E       OSError: [Errno 47] Address family not supported by protocol family

~/.asdf/installs/python/3.13.1/lib/python3.13/socket.py:233: OSError
@svinota svinota added the bug label Feb 6, 2025
svinota added a commit that referenced this issue Feb 10, 2025
Removed:
* config.log
* config.test_platform
* loader
* a functional test from unit tests module

Also closes #1268

Bug-Url: #1268
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

2 participants