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

Fix 500 #501

Merged
merged 4 commits into from Dec 28, 2022
Merged

Fix 500 #501

merged 4 commits into from Dec 28, 2022

Conversation

jacadzaca
Copy link
Collaborator

fix #500

@coveralls
Copy link

coveralls commented Dec 15, 2022

Pull Request Test Coverage Report for Build 3707937262

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.01%) to 93.333%

Totals Coverage Status
Change from base Build 3612230234: 0.01%
Covered Lines: 1162
Relevant Lines: 1245

💛 - Coveralls

@jacadzaca
Copy link
Collaborator Author

@mauritsvanrees plone tests failed

@mauritsvanrees
Copy link
Member

@mauritsvanrees plone tests failed

@jacadzaca This is a problem with tox, where 4.0.0 was recently released. On tox 3 the job works fine, but on 4 we need a small change:

-    pip install -e "git+https://github.com/plone/plone.app.event.git#egg=plone.app.event"
+    pip install -e "git+https://github.com/plone/plone.app.event.git\#egg=plone.app.event"

I have added a commit to your branch.

Copy link

@tisdall tisdall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this!

@@ -18,7 +18,10 @@ New features:

Bug fixes:

- ...
- vBoolean can now be used as an parameter
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the fix covers all the property types... vInt, vTime, etc

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're probably right, but I don't put things in the changelog if there isn't a corresponding test for the entry.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you put it in the changelog, it creates an expectation and then people come back if this is not the case. But since it is in the documentation, the expectation is there either way.

@@ -0,0 +1,9 @@
from icalendar import Event, vBoolean, vCalAddress

def test_vBoolean_can_be_used_as_parameter_issue_500(events):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be tests for some of the other types or is that excessive? Basically everything with an .to_ical() method works and I'm assuming there's test already for those methods.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are tests for proper encoding for other v types, but I don't think there are any for checking if they can be used as a param. If you've got the time to file a PR with a parametrization of this test for other v types I'll gladly accept it :) if you don't, I will try to update the test sometime next week :)

elif isinstance(value, str):
return dquote(value)
else:
return dquote(value.to_ical().decode(DEFAULT_ENCODING))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The None return is interesting. When does it hit?

@niccokunzmann
Copy link
Member

niccokunzmann commented Dec 28, 2022

I see the tests running and from the conversation there arises no problem. I merge. The library is better than before.

@niccokunzmann niccokunzmann merged commit cf9c6c8 into master Dec 28, 2022
@niccokunzmann niccokunzmann deleted the fix-500 branch December 28, 2022 11:43
@niccokunzmann niccokunzmann mentioned this pull request Dec 28, 2022
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.

[BUG] Issues using vBoolean and others for parameters
5 participants