Skip to content

Commit

Permalink
Added missing checks
Browse files Browse the repository at this point in the history
  • Loading branch information
akadlec committed Dec 4, 2021
1 parent 820c256 commit 0ef01dd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 35 deletions.
33 changes: 0 additions & 33 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,39 +111,6 @@ jobs:
- name: "Run tests"
run: "make python_tests"

python-tests-code-coverage:
name: "Tests for Python code with code coverage"
runs-on: "${{ matrix.operating-system }}"
needs: ["python-tests"]

strategy:
matrix:
python: ["3.9"]
operating-system: ["ubuntu-latest"]

steps:
- name: "Checkout"
uses: "actions/checkout@v2"

- name: "Set up Python ${{ matrix.python }}"
uses: "actions/setup-python@v1"
with:
python-version: ${{ matrix.python }}

- name: "Install dependencies"
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: "Install code coverage"
run: "pip install coverage"

- name: "Run code coverage"
run: "make python_coverage"

- name: "Report code coverage"
run: "coverage report"

test-install-python:
name: "Test installation of Python distribution"
runs-on: "${{ matrix.operating-system }}"
Expand Down
2 changes: 1 addition & 1 deletion fb_bus_connector_plugin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
FastyBird BUS connector module
"""

__version__ = "0.1.2"
__version__ = "0.1.3"
6 changes: 6 additions & 0 deletions fb_bus_connector_plugin/clients/pjon.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ def send_packet(self, address: int, payload: List[int], waiting_time: float = 0.

def handle(self) -> int:
"""Process clients"""
if not self.__state:
return 0

try:
result = self.loop()

Expand All @@ -200,6 +203,9 @@ def handle(self) -> int:

def receive(self, received_payload: bytes, length: int, packet_info: Dict) -> None:
"""Process received message by clients"""
if not self.__state:
return

sender_address: Optional[int] = None

try:
Expand Down
2 changes: 1 addition & 1 deletion tests/pytests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# limitations under the License.

"""
MQTT connector plugin tests
FastyBird BUS connector plugin tests
"""

0 comments on commit 0ef01dd

Please sign in to comment.