Skip to content

Commit

Permalink
Merge pull request #285 from espressif/fix/qemu_requires_optional_dep…
Browse files Browse the repository at this point in the history
…endency_idf
  • Loading branch information
hfudev authored Apr 30, 2024
2 parents a90afd0 + 93059df commit 9a25f0d
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 8 deletions.
21 changes: 16 additions & 5 deletions pytest-embedded-arduino/pytest_embedded_arduino/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
"""Make pytest-embedded plugin work with Arduino."""

import importlib

from pytest_embedded.utils import lazy_load

from .app import ArduinoApp
from .serial import ArduinoSerial

__all__ = [
'ArduinoApp',
'ArduinoSerial',
]
__getattr__ = lazy_load(
importlib.import_module(__name__),
{
'ArduinoApp': ArduinoApp,
},
{
'ArduinoSerial': '.serial', # requires esp
},
)

__all__ = ['ArduinoApp', 'ArduinoSerial']


__version__ = '1.10.0'
4 changes: 2 additions & 2 deletions pytest-embedded-idf/pytest_embedded_idf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
'CaseTester': CaseTester,
},
{
'IdfSerial': '.serial',
'IdfDut': '.dut',
'IdfSerial': '.serial', # requires esp
'IdfDut': '.dut', # requires esp
},
)

Expand Down
18 changes: 17 additions & 1 deletion pytest-embedded-qemu/pytest_embedded_qemu/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
"""Make pytest-embedded plugin work with QEMU."""

import importlib

from pytest_embedded.utils import lazy_load

DEFAULT_IMAGE_FN = 'flash_image.bin'
ENCRYPTED_IMAGE_FN = f'encrypted_{DEFAULT_IMAGE_FN}'

from .app import QemuApp # noqa
from .dut import QemuDut # noqa
from .qemu import Qemu # noqa


__getattr__ = lazy_load(
importlib.import_module(__name__),
{
'Qemu': Qemu,
'QemuDut': QemuDut,
},
{
'QemuApp': '.app', # requires idf
},
)


__all__ = [
'DEFAULT_IMAGE_FN',
'ENCRYPTED_IMAGE_FN',
Expand Down

0 comments on commit 9a25f0d

Please sign in to comment.