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

connect: Implement the exercise "connect" #762

Merged
merged 6 commits into from
Nov 7, 2017

Conversation

yunchih
Copy link
Contributor

@yunchih yunchih commented Oct 7, 2017

Implement #733

Copy link
Contributor

@ilya-khadykin ilya-khadykin 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 the PR, @yunchih

Please read my comment

@@ -0,0 +1,113 @@
import unittest
import connect

Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please also leave a comment stating what version of canonical-data.json the tests were adopted as discussed in #784 if aplicable?
The format is:

# Tests adapted from `problem-specifications//canonical-data.json` @ v1.0.0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated!


class ConnectGame:
def __init__(self, board):
pass
Copy link
Contributor

Choose a reason for hiding this comment

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

The solution template doesn't match its usage in connect_test.py. The solution template should only contain placeholders for all classes and methods referenced in the tests. connect_test.py does not reference connect.ConnectGame, but it does reference connect.play(), so that should be in the template.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for pointing this out! (-:
Please check the updated one.

Copy link
Contributor

@cmccandless cmccandless left a comment

Choose a reason for hiding this comment

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

@yunchih I've left a couple more comments on some minor changes.

]


class SieveTest(unittest.TestCase):
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be class ConnectTest(unittest.TestCase):


class SieveTest(unittest.TestCase):
def test_game(self):
for t in testcases:
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you please replace t with a more meaningful name? One common method of naming foreach iterator variables is to just take the singular form of the name of the collection being iterated (i.e. for testcase in testcases).

@yunchih
Copy link
Contributor Author

yunchih commented Nov 2, 2017

@cmccandless updated as requested.

Copy link
Contributor

@cmccandless cmccandless left a comment

Choose a reason for hiding this comment

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

Just one more minor thing.

import unittest
import connect

# Tests adapted from `problem-specifications//canonical-data.json` @ v1.1.0
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, I missed this in my last review: can you please add one additional blank line above this (2 above, 1 below) for consistency across the track?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@ilya-khadykin
Copy link
Contributor

Merged, thanks @yunchih!

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.

3 participants