Skip to content

Fix docker conditional import for tests #1655

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Emantor
Copy link
Member

@Emantor Emantor commented May 10, 2025

Description
This way we can correctly skip the tests if the module is not available,
otherwise we gat a ModuleNotFoundError because of the unconditional
docker import.

Checklist

  • PR has been tested

@Emantor Emantor force-pushed the fix/docker-conditional-import branch from 0fdd961 to 47f0f3b Compare May 10, 2025 10:32
Copy link

codecov bot commented May 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.8%. Comparing base (c3a2b67) to head (3f1c6c0).

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@          Coverage Diff           @@
##           master   #1655   +/-   ##
======================================
  Coverage    55.8%   55.8%           
======================================
  Files         170     170           
  Lines       13389   13389           
======================================
  Hits         7473    7473           
  Misses       5916    5916           
Flag Coverage Δ
3.10 55.8% <ø> (ø)
3.11 55.8% <ø> (ø)
3.12 55.8% <ø> (ø)
3.13 55.7% <ø> (?)
3.9 55.8% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Emantor Emantor changed the title Fix/docker conditional import Fix docker conditional import for tests May 10, 2025
@Emantor
Copy link
Member Author

Emantor commented May 10, 2025

@b2vn could you give this a spin? I currently do not have a docker setup.

@Emantor Emantor force-pushed the fix/docker-conditional-import branch 2 times, most recently from f03b75e to f0b672a Compare May 10, 2025 10:53
@Emantor Emantor requested a review from Bastian-Krause May 13, 2025 13:18
@threexc
Copy link
Contributor

threexc commented Jun 12, 2025

I saw this and gave it a test. Is this what you needed @Emantor ?

Running tests without the docker module:

(venv) tgamblin@megalith ~/workspace/git/labgrid (fix/docker-conditional-import)$ tox -r                                                                                                                                               
py39: remove tox env folder /home/tgamblin/workspace/git/labgrid/.tox/py39                                                                                                                                                             
.pkg: remove tox env folder /home/tgamblin/workspace/git/labgrid/.tox/.pkg                                                                                                                                                             
py39: skipped because could not find python interpreter with spec(s): py39                                                                                                                                                             
py310: remove tox env folder /home/tgamblin/workspace/git/labgrid/.tox/py310                                                                                                                                                           
py39: SKIP ⚠ in 0.07 seconds                                                                                                                                                                                                           
py310: skipped because could not find python interpreter with spec(s): py310                                                                                                                                                           
py311: remove tox env folder /home/tgamblin/workspace/git/labgrid/.tox/py311                                                                                                                                                           
py310: SKIP ⚠ in 0.01 seconds                                                                                                                                                                                                          
py311: skipped because could not find python interpreter with spec(s): py311                                                                                                                                                           
py312: remove tox env folder /home/tgamblin/workspace/git/labgrid/.tox/py312                                                                                                                                                           
py311: SKIP ⚠ in 0.01 seconds                                                                                                                                                                                                          
py312: skipped because could not find python interpreter with spec(s): py312                                                                                                                                                           
py313: remove tox env folder /home/tgamblin/workspace/git/labgrid/.tox/py313                                                                                                                                                           
py312: SKIP ⚠ in 0.01 seconds                                                                                                                                                                                                          
.pkg: install_requires> python -I -m pip install 'setuptools>=47.2.0' 'setuptools_scm[toml]' wheel                                                                                                                                     
.pkg: _optional_hooks> python /home/tgamblin/workspace/git/labgrid/venv/lib64/python3.13/site-packages/pyproject_api/_backend.py True setuptools.build_meta                                                                            
.pkg: get_requires_for_build_sdist> python /home/tgamblin/workspace/git/labgrid/venv/lib64/python3.13/site-packages/pyproject_api/_backend.py True setuptools.build_meta                                                               
.pkg: build_sdist> python /home/tgamblin/workspace/git/labgrid/venv/lib64/python3.13/site-packages/pyproject_api/_backend.py True setuptools.build_meta                                                                                
py313: install_package_deps> python -I -m pip install 'PyVISA-py>=0.5.2' 'PyYAML>=6.0.1' 'Sphinx>=2.0.0' 'ansicolors>=1.1.8' 'attrs>=21.4.0' 'docker>=5.0.2' 'graphviz>=0.17.0' 'grpcio-channelz<2.0.0,>=1.64.1' 'grpcio-reflection<2.0
.0,>=1.64.1' 'grpcio<2.0.0,>=1.64.1' 'jinja2>=3.0.2' 'minimalmodbus>=1.0.2' 'onewire>=0.2' 'paho-mqtt>=2.0.0' 'pexpect>=4.8.0' 'protobuf>=5.27.0' 'psutil>=5.8.0' 'pyModbusTCP>=0.2.0' 'pyasn1<0.6.1' 'pylint>=3.0.0' 'pyserial-labgrid
>=3.4.0.1' 'pysnmp<6,>=4.4.12' pystuck 'pytest-benchmark>=4.0.0' 'pytest-cov>=3.0.0' 'pytest-dependency>=0.5.1' 'pytest-isort>=2.0.0' 'pytest-mock>=3.6.1' 'pytest>=7.0.0' 'python-kasa>=0.7.0' 'python-vxi11>=0.9' 'pyudev>=0.22.0' 'p
yusb>=1.2.1' 'pyvisa>=1.11.3' 'requests>=2.26.0' 'ruff>=0.5.7' 'sphinx_rtd_theme>=1.0.0' 'xmodem>=0.4.6'                                                                                                                               
py313: install_package> python -I -m pip install --force-reinstall --no-deps /home/tgamblin/workspace/git/labgrid/.tox/.tmp/package/3/labgrid-25.1.dev1.tar.gz                                                                         
py313: commands[0]> pytest tests --cov=/home/tgamblin/workspace/git/labgrid/.tox/py313/lib/python3.13/site-packages/labgrid --cov-report=html:htmlcov                                                                                 
========================================================================================================= test session starts =========================================================================================================
platform linux -- Python 3.13.3, pytest-8.4.0, pluggy-1.6.0
cachedir: .tox/py313/.pytest_cache
benchmark: 5.1.0 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /home/tgamblin/workspace/git/labgrid
configfile: pyproject.toml
plugins: anyio-4.9.0, mock-3.14.1, isort-4.0.0, dependency-0.6.0, cov-6.2.0, benchmark-5.1.0
collected 386 items                                                                                                                                                                                                                   

tests/test_agent.py ..........                                                                                                                                                                                                  [  2%]
tests/test_autoinstall.py .....                                                                                                                                                                                                 [  3%]
tests/test_bareboxdriver.py ...                                                                                                                                                                                                 [  4%]
tests/test_client.py ......................                                                                                                                                                                                     [ 10%]
tests/test_config.py .......                                                                                                                                                                                                    [ 12%]
tests/test_coordinator.py ...............                                                                                                                                                                                       [ 16%]
tests/test_dediprogflasher.py ....                                                                                                                                                                                              [ 17%]
tests/test_docker.py ....                                                                                                                                                                                                       [ 18%]
tests/test_environment.py ..........                                                                                                                                                                                            [ 20%]
tests/test_ethernetport.py .                                                                                                                                                                                                    [ 20%]
tests/test_export.py ......                                                                                                                                                                                                     [ 22%]
tests/test_externalconsoledriver.py ..                                                                                                                                                                                          [ 23%]
tests/test_factory.py ..............                                                                                                                                                                                            [ 26%]
tests/test_filedigitaloutput.py ...                                                                                                                                                                                             [ 27%]
tests/test_fixtures.py .........                                                                                                                                                                                                [ 29%]
tests/test_flags.py ......                                                                                                                                                                                                      [ 31%]
tests/test_flashrom.py ..                                                                                                                                                                                                       [ 31%]
tests/test_flashscript.py ....                                                                                                                                                                                                  [ 32%]
tests/test_graphstrategy.py ..............                                                                                                                                                                                      [ 36%]
tests/test_httpdigitalout.py ........                                                                                                                                                                                           [ 38%]
tests/test_httpvideo.py .                                                                                                                                                                                                       [ 38%]
tests/test_lxaiobus.py .....                                                                                                                                                                                                    [ 40%]
tests/test_manualswitchdriver.py ....                                                                                                                                                                                           [ 41%]
tests/test_modbusrtudriver.py ...                                                                                                                                                                                               [ 41%]
tests/test_onewire.py .....                                                                                                                                                                                                     [ 43%]
tests/test_openocd.py sss                                                                                                                                                                                                       [ 44%]
tests/test_pb2.py ............                                                                                                                                                                                                  [ 47%]
tests/test_powerdriver.py ............................s.                                                                                                                                                                        [ 54%]
tests/test_processwrapper.py .....                                                                                                                                                                                              [ 56%]
tests/test_pyvisa.py ..                                                                                                                                                                                                         [ 56%]
tests/test_qemudriver.py ....                                                                                                                                                                                                   [ 57%]
tests/test_remote.py ....                                                                                                                                                                                                       [ 58%]
tests/test_reporter.py ...                                                                                                                                                                                                      [ 59%]
tests/test_resource.py ....                                                                                                                                                                                                     [ 60%]
tests/test_sched.py ....                                                                                                                                                                                                        [ 61%]
tests/test_serialdriver.py ............                                                                                                                                                                                         [ 64%]
tests/test_serialport.py ..                                                                                                                                                                                                     [ 65%]
tests/test_shelldriver.py ........                                                                                                                                                                                              [ 67%]
tests/test_sigrok.py ssss                                                                                                                                                                                                       [ 68%]
tests/test_sispm.py .                                                                                                                                                                                                           [ 68%]
tests/test_sshdriver.py ......sssssssssss                                                                                                                                                                                       [ 73%]
tests/test_step.py ............                                                                                                                                                                                                 [ 76%]
tests/test_steplogger.py .                                                                                                                                                                                                      [ 76%]
tests/test_strategy.py ..                                                                                                                                                                                                       [ 76%]
tests/test_sysfsgpioagent.py ..                                                                                                                                                                                                 [ 77%]
tests/test_target.py .......................................                                                                                                                                                                    [ 87%]
tests/test_tasmota.py ..                                                                                                                                                                                                        [ 88%]
tests/test_timeout.py ..                                                                                                                                                                                                        [ 88%]
tests/test_ubootdriver.py ....                                                                                                                                                                                                  [ 89%]
tests/test_usbtmc.py ..                                                                                                                                                                                                         [ 90%]
tests/test_util.py ......sssssssssssssssss....ssss..                                                                                                                                                                            [ 98%]
tests/test_yaml.py ....                                                                                                                                                                                                         [100%]

========================================================================================================== warnings summary ===========================================================================================================
tests/test_client.py: 155 warnings
tests/test_coordinator.py: 15 warnings
tests/test_fixtures.py: 9 warnings
tests/test_flags.py: 6 warnings
tests/test_remote.py: 5 warnings
tests/test_steplogger.py: 1 warning
  /usr/lib64/python3.13/pty.py:95: DeprecationWarning: This process (pid=275033) is multi-threaded, use of forkpty() may lead to deadlocks in the child.
    pid, fd = os.forkpty()

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================================================================================================== tests coverage ============================================================================================================
___________________________________________________________________________________________ coverage: platform linux, python 3.13.3-final-0 ___________________________________________________________________________________________

Coverage HTML written to dir htmlcov

----------------------------------------------------------------------------------- benchmark: 2 tests ----------------------------------------------------------------------------------
Name (time in us)         Min                 Max              Mean            StdDev            Median               IQR            Outliers  OPS (Kops/s)            Rounds  Iterations
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_map_serialize     1.8900 (1.0)      289.6100 (9.18)     2.0086 (1.0)      0.9937 (3.20)     1.9800 (1.0)      0.0400 (1.0)      920;2241      497.8575 (1.0)       90253           1
test_map_deser         2.5400 (1.34)      31.5400 (1.0)      2.7996 (1.39)     0.3110 (1.0)      2.7700 (1.40)     0.0900 (2.25)    1382;2241      357.1933 (0.72)     104167           1
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Legend:
  Outliers: 1 Standard Deviation from Mean; 1.5 IQR (InterQuartile Range) from 1st Quartile and 3rd Quartile.
  OPS: Operations Per Second, computed as 1 / Mean
====================================================================================== 346 passed, 40 skipped, 191 warnings in 205.83s (0:03:25) ======================================================================================
  py39: SKIP (0.07 seconds)
  py310: SKIP (0.01 seconds)
  py311: SKIP (0.01 seconds)
  py312: SKIP (0.01 seconds)
  py313: OK (220.94=setup[14.23]+cmd[206.71] seconds)
  congratulations :) (221.08 seconds)
(venv) tgamblin@megalith ~/workspace/git/labgrid (fix/docker-conditional-import)$ 
(venv) tgamblin@megalith ~/workspace/git/labgrid (fix/docker-conditional-import)$ python3
Python 3.13.3 (main, Apr 22 2025, 00:00:00) [GCC 15.0.1 20250418 (Red Hat 15.0.1-0)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import docker
Traceback (most recent call last):
  File "<python-input-0>", line 1, in <module>
    import docker
ModuleNotFoundError: No module named 'docker'
>>> exit()

And with:

(venv) tgamblin@megalith ~/workspace/git/labgrid (fix/docker-conditional-import)$ pip install docker
Collecting docker
  Using cached docker-7.1.0-py3-none-any.whl.metadata (3.8 kB)
Requirement already satisfied: requests>=2.26.0 in ./venv/lib64/python3.13/site-packages (from docker) (2.32.4)
Requirement already satisfied: urllib3>=1.26.0 in ./venv/lib64/python3.13/site-packages (from docker) (2.4.0)
Requirement already satisfied: charset_normalizer<4,>=2 in ./venv/lib64/python3.13/site-packages (from requests>=2.26.0->docker) (3.4.2)
Requirement already satisfied: idna<4,>=2.5 in ./venv/lib64/python3.13/site-packages (from requests>=2.26.0->docker) (3.10)
Requirement already satisfied: certifi>=2017.4.17 in ./venv/lib64/python3.13/site-packages (from requests>=2.26.0->docker) (2025.4.26)
Using cached docker-7.1.0-py3-none-any.whl (147 kB)
Installing collected packages: docker
Successfully installed docker-7.1.0

[notice] A new release of pip is available: 24.3.1 -> 25.1.1
[notice] To update, run: pip install --upgrade pip
(venv) tgamblin@megalith ~/workspace/git/labgrid (fix/docker-conditional-import)$ tox -r                                                                                                                                               
py39: remove tox env folder /home/tgamblin/workspace/git/labgrid/.tox/py39
.pkg: remove tox env folder /home/tgamblin/workspace/git/labgrid/.tox/.pkg
py39: skipped because could not find python interpreter with spec(s): py39
py310: remove tox env folder /home/tgamblin/workspace/git/labgrid/.tox/py310
py39: SKIP ⚠ in 0.06 seconds
py310: skipped because could not find python interpreter with spec(s): py310
py311: remove tox env folder /home/tgamblin/workspace/git/labgrid/.tox/py311
py310: SKIP ⚠ in 0.01 seconds
py311: skipped because could not find python interpreter with spec(s): py311
py312: remove tox env folder /home/tgamblin/workspace/git/labgrid/.tox/py312
py311: SKIP ⚠ in 0.01 seconds
py312: skipped because could not find python interpreter with spec(s): py312
py313: remove tox env folder /home/tgamblin/workspace/git/labgrid/.tox/py313
py312: SKIP ⚠ in 0.01 seconds
.pkg: install_requires> python -I -m pip install 'setuptools>=47.2.0' 'setuptools_scm[toml]' wheel
.pkg: _optional_hooks> python /home/tgamblin/workspace/git/labgrid/venv/lib64/python3.13/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: get_requires_for_build_sdist> python /home/tgamblin/workspace/git/labgrid/venv/lib64/python3.13/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: build_sdist> python /home/tgamblin/workspace/git/labgrid/venv/lib64/python3.13/site-packages/pyproject_api/_backend.py True setuptools.build_meta
py313: install_package_deps> python -I -m pip install 'PyVISA-py>=0.5.2' 'PyYAML>=6.0.1' 'Sphinx>=2.0.0' 'ansicolors>=1.1.8' 'attrs>=21.4.0' 'docker>=5.0.2' 'graphviz>=0.17.0' 'grpcio-channelz<2.0.0,>=1.64.1' 'grpcio-reflection<2.0
.0,>=1.64.1' 'grpcio<2.0.0,>=1.64.1' 'jinja2>=3.0.2' 'minimalmodbus>=1.0.2' 'onewire>=0.2' 'paho-mqtt>=2.0.0' 'pexpect>=4.8.0' 'protobuf>=5.27.0' 'psutil>=5.8.0' 'pyModbusTCP>=0.2.0' 'pyasn1<0.6.1' 'pylint>=3.0.0' 'pyserial-labgrid
>=3.4.0.1' 'pysnmp<6,>=4.4.12' pystuck 'pytest-benchmark>=4.0.0' 'pytest-cov>=3.0.0' 'pytest-dependency>=0.5.1' 'pytest-isort>=2.0.0' 'pytest-mock>=3.6.1' 'pytest>=7.0.0' 'python-kasa>=0.7.0' 'python-vxi11>=0.9' 'pyudev>=0.22.0' 'p
yusb>=1.2.1' 'pyvisa>=1.11.3' 'requests>=2.26.0' 'ruff>=0.5.7' 'sphinx_rtd_theme>=1.0.0' 'xmodem>=0.4.6'
py313: install_package> python -I -m pip install --force-reinstall --no-deps /home/tgamblin/workspace/git/labgrid/.tox/.tmp/package/5/labgrid-25.1.dev1.tar.gz
py313: commands[0]> pytest tests --cov=/home/tgamblin/workspace/git/labgrid/.tox/py313/lib/python3.13/site-packages/labgrid --cov-report=html:htmlcov
========================================================================================================= test session starts =========================================================================================================
platform linux -- Python 3.13.3, pytest-8.4.0, pluggy-1.6.0
cachedir: .tox/py313/.pytest_cache
benchmark: 5.1.0 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /home/tgamblin/workspace/git/labgrid
configfile: pyproject.toml
plugins: anyio-4.9.0, mock-3.14.1, isort-4.0.0, dependency-0.6.0, cov-6.2.0, benchmark-5.1.0
collected 386 items                                                                                                                                                                                                                   

tests/test_agent.py ..........                                                                                                                                                                                                  [  2%]
tests/test_autoinstall.py .....                                                                                                                                                                                                 [  3%]
tests/test_bareboxdriver.py ...                                                                                                                                                                                                 [  4%]
tests/test_client.py ......................                                                                                                                                                                                     [ 10%]
tests/test_config.py .......                                                                                                                                                                                                    [ 12%]
tests/test_coordinator.py ...............                                                                                                                                                                                       [ 16%]
tests/test_dediprogflasher.py ....                                                                                                                                                                                              [ 17%]
tests/test_docker.py ....                                                                                                                                                                                                       [ 18%]
tests/test_environment.py ..........                                                                                                                                                                                            [ 20%]
tests/test_ethernetport.py .                                                                                                                                                                                                    [ 20%]
tests/test_export.py ......                                                                                                                                                                                                     [ 22%]
tests/test_externalconsoledriver.py ..                                                                                                                                                                                          [ 23%]
tests/test_factory.py ..............                                                                                                                                                                                            [ 26%]
tests/test_filedigitaloutput.py ...                                                                                                                                                                                             [ 27%]
tests/test_fixtures.py .........                                                                                                                                                                                                [ 29%]
tests/test_flags.py ......                                                                                                                                                                                                      [ 31%]
tests/test_flashrom.py ..                                                                                                                                                                                                       [ 31%]
tests/test_flashscript.py ....                                                                                                                                                                                                  [ 32%]
tests/test_graphstrategy.py ..............                                                                                                                                                                                      [ 36%]
tests/test_httpdigitalout.py ........                                                                                                                                                                                           [ 38%]
tests/test_httpvideo.py .                                                                                                                                                                                                       [ 38%]
tests/test_lxaiobus.py .....                                                                                                                                                                                                    [ 40%]
tests/test_manualswitchdriver.py ....                                                                                                                                                                                           [ 41%]
tests/test_modbusrtudriver.py ...                                                                                                                                                                                               [ 41%]
tests/test_onewire.py .....                                                                                                                                                                                                     [ 43%]
tests/test_openocd.py sss                                                                                                                                                                                                       [ 44%]
tests/test_pb2.py ............                                                                                                                                                                                                  [ 47%]
tests/test_powerdriver.py ............................s.                                                                                                                                                                        [ 54%]
tests/test_processwrapper.py .....                                                                                                                                                                                              [ 56%]
tests/test_pyvisa.py ..                                                                                                                                                                                                         [ 56%]
tests/test_qemudriver.py ....                                                                                                                                                                                                   [ 57%]
tests/test_remote.py ....                                                                                                                                                                                                       [ 58%]
tests/test_reporter.py ...                                                                                                                                                                                                      [ 59%]
tests/test_resource.py ....                                                                                                                                                                                                     [ 60%]
tests/test_sched.py ....                                                                                                                                                                                                        [ 61%]
tests/test_serialdriver.py ............                                                                                                                                                                                         [ 64%]
tests/test_serialport.py ..                                                                                                                                                                                                     [ 65%]
tests/test_shelldriver.py ........                                                                                                                                                                                              [ 67%]
tests/test_sigrok.py ssss                                                                                                                                                                                                       [ 68%]
tests/test_sispm.py .                                                                                                                                                                                                           [ 68%]
tests/test_sshdriver.py ......sssssssssss                                                                                                                                                                                       [ 73%]
tests/test_step.py ............                                                                                                                                                                                                 [ 76%]
tests/test_steplogger.py .                                                                                                                                                                                                      [ 76%]
tests/test_strategy.py ..                                                                                                                                                                                                       [ 76%]
tests/test_sysfsgpioagent.py ..                                                                                                                                                                                                 [ 77%]
tests/test_target.py .......................................                                                                                                                                                                    [ 87%]
tests/test_tasmota.py ..                                                                                                                                                                                                        [ 88%]
tests/test_timeout.py ..                                                                                                                                                                                                        [ 88%]
tests/test_ubootdriver.py ....                                                                                                                                                                                                  [ 89%]
tests/test_usbtmc.py ..                                                                                                                                                                                                         [ 90%]
tests/test_usbvideo.py .                                                                                                                                                                                                        [ 90%]
tests/test_util.py ......sssssssssssssssss....ssss..                                                                                                                                                                            [ 98%]
tests/test_yaml.py ....                                                                                                                                                                                                         [100%]

========================================================================================================== warnings summary ===========================================================================================================
tests/test_client.py: 155 warnings
tests/test_coordinator.py: 15 warnings
tests/test_fixtures.py: 9 warnings
tests/test_flags.py: 6 warnings
tests/test_remote.py: 5 warnings
tests/test_steplogger.py: 1 warning
  /usr/lib64/python3.13/pty.py:95: DeprecationWarning: This process (pid=295844) is multi-threaded, use of forkpty() may lead to deadlocks in the child.
    pid, fd = os.forkpty()

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================================================================================================== tests coverage ============================================================================================================
___________________________________________________________________________________________ coverage: platform linux, python 3.13.3-final-0 ___________________________________________________________________________________________

Coverage HTML written to dir htmlcov

----------------------------------------------------------------------------------- benchmark: 2 tests -----------------------------------------------------------------------------------
Name (time in us)         Min                 Max              Mean            StdDev            Median               IQR             Outliers  OPS (Kops/s)            Rounds  Iterations
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_map_serialize     1.7600 (1.0)      279.6800 (1.15)     1.9498 (1.0)      0.9379 (1.13)     1.9200 (1.0)      0.0400 (1.0)      1142;5635      512.8664 (1.0)      100503           1
test_map_deser         2.4500 (1.39)     243.9100 (1.0)      2.6454 (1.36)     0.8325 (1.0)      2.6100 (1.36)     0.0510 (1.28)     1161;4560      378.0094 (0.74)      96247           1
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Legend:
  Outliers: 1 Standard Deviation from Mean; 1.5 IQR (InterQuartile Range) from 1st Quartile and 3rd Quartile.
  OPS: Operations Per Second, computed as 1 / Mean
====================================================================================== 346 passed, 40 skipped, 191 warnings in 208.14s (0:03:28) ======================================================================================
  py39: SKIP (0.06 seconds)
  py310: SKIP (0.01 seconds)
  py311: SKIP (0.01 seconds)
  py312: SKIP (0.01 seconds)
  py313: OK (222.70=setup[13.70]+cmd[209.00] seconds)
  congratulations :) (222.83 seconds)

This way we can correctly skip the tests if the module is not available,
otherwise we gat a ModuleNotFoundError because of the unconditional
docker import.

Signed-off-by: Rouven Czerwinski <[email protected]>
@Emantor Emantor force-pushed the fix/docker-conditional-import branch from f0b672a to 3f1c6c0 Compare June 19, 2025 14:57
@Emantor Emantor requested a review from jluebbe June 19, 2025 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants