diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 14f3e67..a234ccd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,6 +22,7 @@ jobs: task: make -f Makefile yamllint - dependencies: > bandit + libatomic monkeytype pylint python3-dbus @@ -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: @@ -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: > diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 1aa8d90..ee61e4d 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -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: > diff --git a/setup.cfg b/setup.cfg index 9a2d074..ebe7e8e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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 diff --git a/tests/test_hypothesis.py b/tests/test_hypothesis.py index dc812db..6272b80 100644 --- a/tests/test_hypothesis.py +++ b/tests/test_hypothesis.py @@ -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"