Skip to content

Commit

Permalink
added a timeout to the integration test and removed MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
Hundemeier committed Dec 4, 2022
1 parent e1ee6fe commit 25aca5d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:

strategy:
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
os: ["ubuntu-latest", "windows-latest"]
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
# use Ubuntu 20.04 for Python 3.6
exclude:
Expand All @@ -31,12 +31,13 @@ jobs:
python -m pip install --upgrade pip
# there are currently no dependencies
# pip install -r requirements.txt
- name: Install flake8
run: pip install flake8
- name: Lint with flake8
run: |
pip install flake8
# stop the build if flake reports any issues
flake8 . --statistics --show-source
- name: Install pytest
run: pip install pytest pytest-timeout
- name: Test with pytest
run: |
pip install pytest
pytest --run-integration-tests
run: pytest --run-integration-tests
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ Some tools are used to help with development of this library. These are [flake8]
Install those tools with pip:

```
pip install flake8 pytest coverage
pip install flake8 pytest pytest-timeout coverage
```

`flake8` checks for formatting issues and can be run with `flake8` or `python -m flake8` in the root directory of this repository.
Expand Down
1 change: 1 addition & 0 deletions integration_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from collections import OrderedDict


@pytest.mark.timeout(5)
@pytest.mark.integration_test
def test_integration():
logging.basicConfig(level=logging.DEBUG) # enable logging of sacn module
Expand Down

2 comments on commit 25aca5d

@mthespian
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove MacOS?

@Hundemeier
Copy link
Owner Author

@Hundemeier Hundemeier commented on 25aca5d Dec 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that MacOS does not allow multiple sockets on the same port (I think issue #41 is similar). So I added a workaround in the integration test and MacOS is part of the GitHub Actions workflow again.

See my comment in the integration_test.py.

sacn/integration_test.py

Lines 28 to 30 in 617bcdf

# Note that MacOS can not bind two sockets to the same port,
# but sender and receiver both use one socket on the same port by default.
# The workaround is to use a different port on the sender on MacOS.

Please sign in to comment.