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

Event edit tests fail due to newer DateTime #69

Open
mauritsvanrees opened this issue Dec 21, 2022 · 0 comments
Open

Event edit tests fail due to newer DateTime #69

mauritsvanrees opened this issue Dec 21, 2022 · 0 comments
Assignees

Comments

@mauritsvanrees
Copy link
Sponsor Member

In coredev 5.2 (and Plone 5.2.10.1) I updated Zope for a security fix, but this included a few other package updates which are pinned in the Zope versions.cfg. DateTime was updated from 4.4 to 4.8. Version 4.7 contains a fix for a possible rounding problem. But that causes a test to fail:

$ bin/test -s Products.ATContentTypes -m test_atevent -t test_edit
...
Error in test test_edit (Products.ATContentTypes.tests.test_atevent.TestSiteATEvent)
Traceback (most recent call last):
  File "/Users/maurits/.pyenv/versions/2.7.18/lib/python2.7/unittest/case.py", line 329, in run
    testMethod()
  File "/Users/maurits/community/plone-coredev/5.2/src/Products.ATContentTypes/Products/ATContentTypes/tests/test_atevent.py", line 76, in test_edit
    self.assertEqual(new.end_date, new.end().asdatetime())
  File "/Users/maurits/community/plone-coredev/5.2/src/Products.ATContentTypes/Products/ATContentTypes/content/event.py", line 283, in _end_date
    return value.asdatetime()
  File "/Users/maurits/community/plone-coredev/5.2/src/DateTime/src/DateTime/DateTime.py", line 1733, in asdatetime
    self._minute, second, microsec, tzinfo)
TypeError: integer argument expected, got float

I am looking at doing a PR for DateTime.
Meanwhile the workaround is to pin DateTime back to say 4.6. Let me do that on 5.2.

@mauritsvanrees mauritsvanrees self-assigned this Dec 21, 2022
mauritsvanrees added a commit to plone/buildout.coredev that referenced this issue Dec 21, 2022
4.7 has a regression for at least ATContentTypes.  See plone/Products.ATContentTypes#69
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

No branches or pull requests

1 participant