Skip to content

Fix tests - #62

Merged
aviks merged 6 commits into
masterfrom
as/fixtests
Nov 16, 2025
Merged

aviks merged 6 commits into
masterfrom
as/fixtests

Conversation

@aviks

@aviks aviks commented Nov 15, 2025 •

Copy link
Copy Markdown
Owner

This PR contains 2 somewhat independent changes, which taken together should make the tests in this package run successfully to completion once again.

  1. The mock smtp server used in the tests was build on a python standard library called asynccore. This module was deprecated, and finally removed in python 3.12. This is now replaced by the asyncio module, and the aiosmtpd package.

  2. The changes in Break attachments into smaller lines #55 broke the tests. Given the passage of time (and the fact that actions history does not go that far back) I'm not sure why we merged it without the tests passing. Maybe it was broken for some other reason? Anyways, another reason to not merge stuff without successful tests, however tempting that may be 😄

@aviks aviks changed the title replace deprecated asyncore with asynio and aiosmtpd in tests Fix tests Nov 16, 2025
@aviks

aviks commented Nov 16, 2025

Copy link
Copy Markdown
Owner Author

OK, I've spent a full day on this, and all tests pass on Linux on 1.6. 1.10, 1.12 and nightly. Tests also pass on Windows (with one caveat).

However, the mock server does not seem to start on the mac. I don't have easy access to a mac myself, and have really run out of time to spend on this. So unfortunately, I will have to disable testing on the mac for this package. If someone can fix the mac tests, it will be much appreciated.

@aviks

aviks commented Nov 16, 2025

Copy link
Copy Markdown
Owner Author
image

🥳

@aviks
aviks merged commit 5ef580e into master Nov 16, 2025
15 of 18 checks passed
@aviks

aviks commented Nov 16, 2025

Copy link
Copy Markdown
Owner Author

The mock server on linux is still a bit flakey, sometimes the client fails to connect to it. not sure why, but re-running the job seems to fix it.

@aviks
aviks deleted the as/fixtests branch November 17, 2025 15:24
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.

1 participant