Skip to content

Change sort of registered readers/writers to avoid comparing types#2322

Merged
astrofrog merged 2 commits intoastropy:masterfrom
mwcraig:fix-2312
Apr 17, 2014
Merged

Change sort of registered readers/writers to avoid comparing types#2322
astrofrog merged 2 commits intoastropy:masterfrom
mwcraig:fix-2312

Conversation

@mwcraig
Copy link
Member

@mwcraig mwcraig commented Apr 14, 2014

Closes #2312 (also in commit comment to make sure it autocloses)

I could not find a way to test the change to io.registry._get_valid_format.

@taldcroft
Copy link
Member

Isn't the change in io.registry._get_valid_format already being tested in test_read_toomanyformats? That is running the code to raise an exception and validating the output.

CHANGES.rst Outdated
Copy link
Member

Choose a reason for hiding this comment

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

Just being nitpicky, but this should have a period at the end.

@taldcroft
Copy link
Member

@mwcraig - overall this looks good, thanks! We should wait to see if @astrofrog wants to have a look before merging.

@mwcraig
Copy link
Member Author

mwcraig commented Apr 15, 2014

@taldcroft -- thanks for the feedback! What test_read_toomanyformats doesn't test is the case when the sorted in io.registry._get_valid_format resorts to comparing the objects because the names are the same.

I don't think it needs a separate test necessarily, since the same fix is tested in test_register_readers_with_same_name_on_different_classes...but it was a code change without a corresponding test so I wanted to point it out.

@taldcroft
Copy link
Member

@mwcraig - I agree that the code looks fine and doesn't need a separate test.

@astrofrog astrofrog added this to the v0.3.2 milestone Apr 17, 2014
@astrofrog
Copy link
Member

Looks good - thanks @mwcraig!

astrofrog added a commit that referenced this pull request Apr 17, 2014
Change sort of registered readers/writers to avoid comparing types
@astrofrog astrofrog merged commit f250376 into astropy:master Apr 17, 2014
astrofrog added a commit that referenced this pull request Apr 23, 2014
Change sort of registered readers/writers to avoid comparing types
@mwcraig mwcraig deleted the fix-2312 branch May 19, 2014 16:26
nstarman added a commit to nstarman/astropy that referenced this pull request Oct 29, 2021
Signed-off-by: Nathaniel Starkman (@nstarman) <[email protected]>
nstarman added a commit to nstarman/astropy that referenced this pull request Oct 29, 2021
Signed-off-by: Nathaniel Starkman (@nstarman) <[email protected]>
nstarman added a commit to nstarman/astropy that referenced this pull request Oct 29, 2021
Signed-off-by: Nathaniel Starkman (@nstarman) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

I/O registry generates error in python3

3 participants