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

Update workflow to check code format #10

Merged
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
6 changes: 5 additions & 1 deletion .github/workflows/astarte-ctl-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,11 @@ jobs:

- name: Install dependencies
shell: bash
run: pip install -e ./tests
run: pip install -e ./tests

- name: Format check
shell: bash
run: python -m black -l 100 --diff --check tests/
osmanhadzic marked this conversation as resolved.
Show resolved Hide resolved

- name: Run tests
shell: bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def test_get_sample_data_for_nonexisting_device(astarte_env_vars):
assert "Device not found" in sample_data_result.stderr


def test_get_sample_data_for_nonexisting_interface(astarte_env_vars):
def test_get_sample_data_for_existing_device(astarte_env_vars):
device_id = astarte_env_vars["device_test_1"]
astarte_url = astarte_env_vars["astarte_url"]
realm = astarte_env_vars["realm"]
Expand Down
7 changes: 6 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,9 @@ def astarte_env_vars():
astarte_url and realm and jwt
), "Environment variables for Astarte setup are not properly configured."

return {"astarte_url": astarte_url, "realm": realm, "jwt": jwt, "device_test_1": device_test_1}
return {
"astarte_url": astarte_url,
"realm": realm,
"jwt": jwt,
"device_test_1": device_test_1,
}
3 changes: 2 additions & 1 deletion tests/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ authors = [
]
dependencies = [
"pytest>=7.0.0",
"black>=23.1.0"
]
classifiers = [
"Programming Language :: Python",
Expand All @@ -24,7 +25,7 @@ classifiers = [
static = ["black", "pylint"]

[tool.black]
line-length = 88
line-length = 100
target-version = ["py312"]

[tool.isort]
Expand Down
Loading