8000 Fix unit test by ruck94301 · Pull Request #267 · umyelab/LabGym · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix unit test #267

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

Merged
merged 3 commits into from
Jun 24, 2025
Merged

Fix unit test #267

merged 3 commits into from
Jun 24, 2025

Conversation

ruck94301
Copy link
Contributor

This PR does two things.

  1. fixes tests/test_mylogging.py to use monkeypatch instead of mock. When tests/test_mylogging.py was written, pytest-mock was in the venv. This change helps avoid adding an unnecessary dependency.
  2. Added logging crumbs to 2 files, analyze_behavior.py and tools.py. These helped isolate a protobuf compatibility issue during import tensorflow.keras.preprocessing.image.

Add logging to bracket the new error messages after an update to protobuf library.
The new warning messages come from the import of
tensorflow.keras.preprocessing.image, so investigate there.
Change from mocker to monkeypatch so no dependency on mock (pytest-mock?)
@ruck94301
Copy link
Contributor Author
  1. added a one-liner in mylogging.py to import type annotations from future for Python 3.9.

Now the CI tests pass.

@yujiahu415 yujiahu415 merged commit c0001f7 into umyelab:master Jun 24, 2025
2 checks passed
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
0