Skip to content

Test Failure when running tests in UTC+3 #57

@bkmgit

Description

@bkmgit

Get the following test failure on my machine:

=================================== FAILURES ===================================
________________________ TestValueModule.test_DateValue ________________________
self = <test_value.TestValueModule testMethod=test_DateValue>
    def test_DateValue(self):
        date = datetime.date(2024, 7, 4)
        with self.subTest(date=date):
>           self.do_test_DateValue(date)
tests/test_value.py:426: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_value.py:420: in do_test_DateValue
    self.do_conversion_tests(value, py_date.isoformat(), seconds)
tests/test_value.py:83: in do_conversion_tests
    self.assertAlmostEqual(result, float(number), places=5)
E   AssertionError: 1720040448.0 != 1720051200.0 within 5 places (10752.0 difference)
=========================== short test summary info ============================
FAILED tests/test_value.py::TestValueModule::test_DateValue - AssertionError:...
=================== 1 failed, 52 passed, 8 skipped in 0.30s ====================

This comes from
https://github.com/jim-easterbrook/python-exiv2/blob/main/tests/test_value.py#L420
which calls
https://github.com/jim-easterbrook/python-exiv2/blob/main/tests/test_value.py#L78

Seems that some of the conversions are to local timr and others to UTC

10752 seconds is about 3 hours.

Metadata

Metadata

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions