Skip to content
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

test_email fails on Mac in summer #36393

Closed
jackjansen opened this issue Apr 7, 2002 · 5 comments
Closed

test_email fails on Mac in summer #36393

jackjansen opened this issue Apr 7, 2002 · 5 comments
Assignees
Labels
stdlib Python modules in the Lib dir

Comments

@jackjansen
Copy link
Member

BPO 540720
Nosy @warsaw, @jackjansen
Files
  • test-email.txt: More robust test of parsedate()/formatdate() ?
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/warsaw'
    closed_at = <Date 2002-04-22.16:25:49.000>
    created_at = <Date 2002-04-07.21:55:50.000>
    labels = ['library']
    title = 'test_email fails on Mac in summer'
    updated_at = <Date 2002-04-22.16:25:49.000>
    user = 'https://github.com/jackjansen'

    bugs.python.org fields:

    activity = <Date 2002-04-22.16:25:49.000>
    actor = 'barry'
    assignee = 'barry'
    closed = True
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2002-04-07.21:55:50.000>
    creator = 'jackjansen'
    dependencies = []
    files = ['413']
    hgrepos = []
    issue_num = 540720
    keywords = []
    message_count = 5.0
    messages = ['10202', '10203', '10204', '10205', '10206']
    nosy_count = 2.0
    nosy_names = ['barry', 'jackjansen']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue540720'
    versions = []

    @jackjansen
    Copy link
    Member Author

    Yes, I kid you not:-)

    The test of the date/time parser in test_email tries to cater for the fact that the Mac uses localtime (at least, before OSX), but it fails to cater for DST. So, test_email passes in winter, but fails in summer.

    I think the whole idea of comparing based on a numeric value is not so good. Why not try a roundtrip, or compare against another date coder (time.asctime)?

    @jackjansen jackjansen added the stdlib Python modules in the Lib dir label Apr 7, 2002
    @jackjansen jackjansen added the stdlib Python modules in the Lib dir label Apr 7, 2002
    @warsaw
    Copy link
    Member

    warsaw commented Apr 8, 2002

    Logged In: YES
    user_id=12800

    What do you think of the attached patch? Is this still a
    useful test to include?

    @jackjansen
    Copy link
    Member Author

    Logged In: YES
    user_id=45365

    Barry,
    I can't apply the patch, it seems to be against a different version of test_email than what's in the repository (I tried both the trunk and the 22 maintainance branch).

    @warsaw
    Copy link
    Member

    warsaw commented Apr 15, 2002

    Logged In: YES
    user_id=12800

    Actually, forget the patch. I integrated email 2.0 into
    Python 2.3's cvs and this included the proposed fix. Take a
    look at test_formatdate() and test_formatdate_localtime() in
    Lib/test/test_email.py and let me know what you think.

    @warsaw
    Copy link
    Member

    warsaw commented Apr 22, 2002

    Logged In: YES
    user_id=12800

    I believe the patch resolved this issue.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants