Skip to content

saddle-points: Add tests for non-square matrices#1449

Merged
cmccandless merged 2 commits intoexercism:masterfrom
Alexhans:master
Aug 8, 2018
Merged

saddle-points: Add tests for non-square matrices#1449
cmccandless merged 2 commits intoexercism:masterfrom
Alexhans:master

Conversation

@Alexhans
Copy link
Copy Markdown
Contributor

@Alexhans Alexhans commented Aug 7, 2018

The saddle-points exercise made no indication that it was just for NxN matrices but tests for NxM matrices were non-existent.

This pull request depends on the successful merge of exercism/problem-specifications/pull/1288

def test_matrix_with_one_elem_has_single_saddle_point(self):
matrix = [[1]]
self.assertEqual(saddle_points(matrix), set([(0, 0)]))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This test is not canonical, but I think it's a good one. Might not be a bad idea to create another PR in problem-specifications to add it there too, but I don't think this PR needs to be held up waiting on that.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@cmccandless Oh. Yes. I forgot to remove that test. I had initially written it but then considered that the the issue was about NxM and it wasn't directly related so I didn't want to add extraneous tests to it.

I guess I should've asked first whether to include it or not but decided not to and forgot to remove it in this pull request.

Now that it has been merged... Should I create a new pull request in canonical with the same version number explaining that I'm adding that single element test or what should I do?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@Alexhans At this point, I would suggest making a new pull request in canonical, bumping the version number to 1.4.0 (because minor number is changed whenever tests are added/removed) and adding the 1x1 test.

@cmccandless cmccandless merged commit 677f108 into exercism:master Aug 8, 2018
@cmccandless
Copy link
Copy Markdown
Contributor

Merged; thanks for working on this!

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.

2 participants