Skip to content

Test test_writer_bad_message fails when not in UTC timezone #51

Description

@juliangilbey

The test_writer_bad_message fails when running in a timezone other than UTC, as the timestamp() method presumes that it is local time unless a timezone is specified, and so the assert (which has assumed UTC) fails. This patch fixes this issue.

--- a/test/test_streams.py
+++ b/test/test_streams.py
@@ -119,6 +119,7 @@
         hour=1,
         minute=1,
         second=1,
+        tzinfo=datetime.timezone.utc,
     ))
 
     assert wfile.getvalue() in [

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions