SamuelYvon / netifaces-2

netifaces reborn
https://pypi.org/project/netifaces2/
MIT License
24 stars 8 forks source link

Adding Tests #9

Closed SamuelYvon closed 1 year ago

martinhoyer commented 1 year ago

Not sure we can test the cross-compiled wheels, at least not without qemu.

SamuelYvon commented 1 year ago

Yep, my plan was to use the linux, mac and windows base wheels only. Unfortunately this leaves the other os-arch combo "untested" but it's more a matter of "is the API working". This certainly leaves gaps, but imo it's better than nothing

martinhoyer commented 1 year ago

Let me try to test at least multiple python versions, give me a sec.

SamuelYvon commented 1 year ago

You're certainly motivated ;)

SamuelYvon commented 1 year ago

There's a lot to think about; before you invest time in this, it might be worthwhile checking if qemu is the best way to go, since we need to know what's the actual information about the network interfaces

martinhoyer commented 1 year ago

it might be worthwhile checking if qemu is the best way

To clarify, I was thinking multiple python versions on x86_64 Linux :)
At least PoC, don't have experience with Win or Mac.

SamuelYvon commented 1 year ago

it might be worthwhile checking if qemu is the best way

To clarify, I was thinking multiple python versions on x86_64 Linux :) At least PoC, don't have experience with Win or Mac.

Fair enough; but I think checking out a more complex setup (maybe not now) where we can control the expected interfaces / addresses would be worthwhile.

There's nothing in test.py right now but I was going to simply call the api and explore the results, ensuring that there's at least an ipv4/v6 addr

martinhoyer commented 1 year ago

Yeah, mock some complex stuff. But first put some some test framework/workflow in place. See #15

SamuelYvon commented 1 year ago

Rebased on top of #15

SamuelYvon commented 1 year ago

@martinhoyer I added your nox pipeline to macos as well and added a "more complex" test. Is there anything else you'd see useful for now?

martinhoyer commented 1 year ago

Niice. I'm far from being an expert on pytest to be honest, but since you've asked, I wonder if you can use mock to simulate various configurations.