some unit tests are importing mock
Metadata
Current evaluation
Fixed via ubuntu-core/snapcraft PR #492 (commit 6e3f923d3, "Import mock from unittest.") and PR #494 (16a0eeba7, "Remove missing replacement for unittest.mock"); shipped in snapcraft 2.8.8b SRU, verified and released to xenial -updates.
Resolution: closed resolved
Reason: Unit tests were switched from the external mock package to unittest.mock by upstream PRs #492 and #494 (commits 6e3f923d3 and 16a0eeba7), which the janitor changelog lists as "Import mock from unittest. (#492) (LP: #1576998)". The fix was uploaded as snapcraft 2.8.8b into xenial-proposed, verified by ~elopio on 2016-05-13 (tag moved to verification-done) and released to -updates on 2016-05-18.
Evaluated by: mr-cal-bot
Issue body
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Fixed via ubuntu-core/snapcraft PR #492 (commit 6e3f923d3, "Import mock from unittest.") and PR #494 (16a0eeba7, "Remove missing replacement for unittest.mock"); shipped in snapcraft 2.8.8b SRU, verified and released to xenial -updates. | |
| stealth/space-bunny-alpha | — | closed resolved | Unit tests imported the standalone `mock` module instead of Python 3's `unittest.mock`, breaking packaging. Fixed by merged PR #492 ("Import mock from unittest", LP: #1576998), released in snapcraft 2.8.8b; LP verification passed and the SRU shipped to xenial-updates. | |
| stealth/space-bunny-alpha | — | closed resolved | Unit tests were fixed to import mock from unittest.mock in PR #492 (commit 6e3f923d3), with related cleanup merged in PR #494. | |
| qwen/qwen3.6-35b-a3b | — | — | Fixed and verified. Unit tests were updated to use unittest.mock instead of mock for Python 3 compatibility. The maintainer verified the resolution. | |
| qwen/qwen3.6-35b-a3b | — | — | Fixed by updating unit test imports to use unittest.mock for Python 3 compatibility. The fix was verified and the issue closed. | |
| qwen/qwen3.6-35b-a3b | — | — | Resolved by updating unit test imports to use unittest.mock for Python 3 compatibility. The issue was closed after verification. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Fixed Python 3 compatibility by updating unit test imports to use unittest.mock. The issue was closed and marked verification-done. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
ubuntu-core/snapcraft#492
(confidence 97%)
PR titled "Import mock from unittest.", commit 6e3f923d3, credited in the 2.8.8b changelog for LP: #1576998.
-
Likely Fixed By:
ubuntu-core/snapcraft#494
(confidence 90%)
Follow-up commit 16a0eeba7 "Remove missing replacement for unittest.mock" also tagged LP: #1576998 in the 2.8.8b changelog.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1596068 The unittests in autopkgtest are run twice | snapcraft (launchpad) | closed | PR #600 removed unit tests from autopkgtest, merging as commit 8a4d204de and shipping in snapcraft 2.12; the SRU was successfully verified. |