Skip to content

Commit

Permalink
Merge pull request #5597 from stephenchengCloud/private/stephenche/me…
Browse files Browse the repository at this point in the history
…rge_unittest_into_tests

Merge python3/unittest into python3/tests
  • Loading branch information
robhoes committed Apr 29, 2024
2 parents dabc634 + fdc9c08 commit 97aa0e0
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ coverage:
tests:
# Ensure that all tests are executed (tests themselves must be 100% covered)
target: 98%
paths: ["python3/unittest/test_*.py"]
paths: ["python3/tests/test_*.py"]


#
Expand Down Expand Up @@ -266,5 +266,5 @@ component_management:

- component_id: test_cases
name: test_cases
paths: ["python3/unittest/test_*.py"]
paths: ["python3/tests/test_*.py"]

2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
run: >
pytest
--cov=python3/
python3/unittest python3/tests -vv -rA
python3/tests -vv -rA
--junitxml=.git/pytest${{matrix.python-version}}.xml
--cov-report term-missing
--cov-report xml:.git/coverage${{matrix.python-version}}.xml
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@
import mock

from python3.tests.import_helper import import_file_as_module

# mock modules to avoid dependencies
sys.modules["xcp"] = mock.Mock()
sys.modules["xcp.logger"] = mock.Mock()
sys.modules["pyudev"] = mock.Mock()
usb_scan = import_file_as_module("python3/libexec/usb_scan.py")


class MocDeviceAttrs(Mapping):
Expand Down Expand Up @@ -112,7 +113,6 @@ def verify_usb_common(
# Use relative path to allow tests to be started in subdirectories
path = os.path.dirname(__file__) + "/../../scripts/usb-policy.conf"
):
usb_scan = import_file_as_module("python3/libexec/usb_scan.py")

mock_setup(usb_scan, moc_devices, moc_interfaces, path)

Expand Down

0 comments on commit 97aa0e0

Please sign in to comment.