Skip to content
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
5 changes: 3 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
task: make -f Makefile yamllint
- dependencies: >
bandit
libatomic
monkeytype
pylint
python3-dbus
Expand All @@ -44,7 +45,7 @@ jobs:
- dependencies: python python3-build twine
task: make -f Makefile package
runs-on: ubuntu-latest
container: fedora:41 # CURRENT DEVELOPMENT ENVIRONMENT
container: fedora:42 # CURRENT DEVELOPMENT ENVIRONMENT
steps:
- uses: actions/checkout@v5
with:
Expand Down Expand Up @@ -72,7 +73,7 @@ jobs:
python3-hypothesis
task: PYTHONPATH=./src make -f Makefile test
runs-on: ubuntu-latest
container: fedora:41 # CURRENT DEVELOPMENT ENVIRONMENT
container: fedora:42 # CURRENT DEVELOPMENT ENVIRONMENT
steps:
- name: Install python3.12
run: >
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
monkeytype:
runs-on: ubuntu-24.04
container:
image: fedora:41 # CURRENT DEVELOPMENT ENVIRONMENT
image: fedora:42 # CURRENT DEVELOPMENT ENVIRONMENT
steps:
- name: Install dependencies for Fedora
run: >
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ classifiers =
Topic :: Software Development :: Libraries :: Python Modules

[options]
python_requires = >=3.12
install_requires =
dbus-signature-pyparsing
dbus-python>=1.2.10
Expand Down
22 changes: 22 additions & 0 deletions tests/test_hypothesis.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,28 @@ class ParseTestCase(unittest.TestCase):
Test parsing various signatures.
"""

@given(
strategies.tuples(
dbus_signatures(
min_complete_types=1,
max_complete_types=1,
exclude_arrays=True,
exclude_dicts=True,
exclude_structs=True,
blacklist="v",
),
dbus_signatures(min_complete_types=1, max_complete_types=1),
)
)
@settings(max_examples=5)
def test_empty_dict(self, strat):
"""
Test parsing an empty dict with a valid signature.
"""
(key_sig, value_sig) = strat
sig = f"{key_sig}{value_sig}"
self.assertEqual(signature(dbus.Dictionary(signature=sig)), "a{" + sig + "}")

@given(
dbus_signatures(
min_complete_types=1, max_complete_types=1, blacklist="h"
Expand Down
Loading