Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
XavierJiezou committed Apr 29, 2022
1 parent 7b9f4a5 commit 8d88b5d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
run: poetry install

- name: Generate coverage report
run: pytest --cov=./ --cov-report=xml
run: poetry run python -m pytest --cov=./ --cov-report=xml

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@ jobs:
runs-on: ${{ matrix.image }}
strategy:
matrix:
# os: [Ubuntu, macOS, Windows]
os: [macOS]
# python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: ["3.7"]
os: [Ubuntu, macOS, Windows]
python-version: ["3.7", "3.8", "3.9", "3.10"]
include:
- os: Ubuntu
image: ubuntu-latest
Expand Down
1 change: 0 additions & 1 deletion netsm/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ def __init__(self):
def addrs(self):
addrs = {}
netad = psutil.net_if_addrs()
print(netad)
for nic in netad:
addrs[nic] = {}
if len(netad[nic]) == 1:
Expand Down
6 changes: 5 additions & 1 deletion tests/test_netsm.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from netsm import __version__
from netsm.core import NetSM
import toml
import sys


def test_version():
Expand All @@ -13,7 +14,10 @@ def test_netsm():
netsm = NetSM()
speed = netsm.speed
addrs = netsm.addrs
assert len(speed) == len(addrs)
if sys.platform == 'darwin': # macOS
assert len(speed) == len(addrs)+2
else: # Linux and Windows
assert len(speed) == len(addrs)


def test_format():
Expand Down

0 comments on commit 8d88b5d

Please sign in to comment.