-
Notifications
You must be signed in to change notification settings - Fork 36
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
Fix tests and related warnings #217
Merged
rohanpm
merged 9 commits into
release-engineering:master
from
lzaoral:update-and-fix-tests
Aug 23, 2023
Merged
Fix tests and related warnings #217
rohanpm
merged 9 commits into
release-engineering:master
from
lzaoral:update-and-fix-tests
Aug 23, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The original test misunderstood the intended behaviour of this method. Resolves: release-engineering#68
They have been passing for few years already so there is no reason to keep them in this state forever. Resolves: release-engineering#73
To fix the following Python 3.13 deprecation warning: ``` kobo/hub/models.py:535: DeprecationWarning: 'pipes' is deprecated and slated for removal in Python 3.13 import pipes ```
lzaoral
force-pushed
the
update-and-fix-tests
branch
2 times, most recently
from
August 21, 2023 05:45
134cc50
to
43db3cd
Compare
rohanpm
reviewed
Aug 22, 2023
Fixes the following Django 5.0 deprecation warning: ``` tests/test_forms.py: 6 warnings tests/test_models.py: 88 warnings tests/test_taskmanager.py: 37 warnings tests/test_views.py: 8 warnings tests/test_xmlrpc_auth.py: 2 warnings tests/test_xmlrpc_client.py: 9 warnings tests/test_xmlrpc_worker.py: 63 warnings kobo/.kobo_venv/lib/python3.11/site-packages/django/db/models/fields/related_lookups.py:52: RemovedInDjango50Warning: Passing unsaved model instances to related filters is deprecated. ```
…_fatal_error Fixes the following pytest warning: ``` tests/test_logger.py::TestLoggingThread::test_logs_on_fatal_error kobo/.kobo_venv/lib/python3.11/site-packages/_pytest/threadexception.py:73: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-1 Traceback (most recent call last): File "/opt/homebrew/Cellar/[email protected]/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 1038, in _bootstrap_inner self.run() File "kobo/kobo/worker/logger.py", line 67, in run self._hub.upload_task_log(BytesIO(self._send_data), self._task_id, "stdout.log", append=True) File "kobo/.kobo_venv/lib/python3.11/site-packages/mock/mock.py", line 1062, in __call__ return _mock_self._mock_call(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "kobo/.kobo_venv/lib/python3.11/site-packages/mock/mock.py", line 1118, in _mock_call raise effect RuntimeError: Simulated error warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) ```
Fixes the following Python deprecation warning: ``` kobo/django/django_version.py:10: 10 warnings tests/test_view_log.py: 24 warnings tests/test_views.py: 6 warnings tests/test_xmlrpc_auth.py: 8 warnings kobo/kobo/django/django_version.py:10: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. return LooseVersion(django.get_version()) >= LooseVersion(version_str) ```
lzaoral
force-pushed
the
update-and-fix-tests
branch
from
August 22, 2023 06:55
43db3cd
to
e7556a1
Compare
rohanpm
approved these changes
Aug 23, 2023
lzaoral
added a commit
to lzaoral/kobo
that referenced
this pull request
Aug 23, 2023
... to ensure that the db operation is atomic. Fixes: c5d7f8e ("Fix calculating the number of task's subtasks in new Django versions") Related: release-engineering#217 (comment)
lzaoral
added a commit
to lzaoral/kobo
that referenced
this pull request
Aug 24, 2023
... to ensure that the db operation is atomic. Fixes: c5d7f8e ("Fix calculating the number of task's subtasks in new Django versions") Related: release-engineering#217 (comment)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes two tests, removes
XFAIL
for already passing tests and fixes majority of warnings emitted during testing.Resolves: #68
Resolves: #73