Skip to content

Conversation

@idbrii
Copy link

@idbrii idbrii commented Apr 29, 2021

Fix #89: properties method failed when no props defined

When a file has no properties, the xml doesn't contain 'target' and
target_elem is None. To conform to the documentation for properties,
return an empty dict (instead of None).

Test for both no properties and mime type property (writing a binary
file in the simplest way I can find).

Ran tests with nose2 on WSL and all passed.

@coveralls
Copy link

coveralls commented Apr 29, 2021

Coverage Status

Coverage increased (+3.0%) to 81.044% when pulling 9f01114 on idbrii:fix-89-properties into c0878be on dsoprea:master.

@idbrii
Copy link
Author

idbrii commented Apr 29, 2021

This has some overlap with #121, but it's a smaller fix without merge conflicts.

Fix dsoprea#89: properties method failed when no props defined

When a file has no properties, the xml doesn't contain 'target' and
target_elem is None. To conform to the documentation for properties,
return an empty dict (instead of None).

Test for both no properties and mime type property (writing a binary
file in the simplest way I can find that works in py2 and py3).
@idbrii idbrii force-pushed the fix-89-properties branch from 0e8f306 to 9f01114 Compare April 30, 2021 00:00
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.

properties method failed when no props defined

2 participants