Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge python3/unittest into python3/tests #5597

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
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
Loading