circular-buffer: Update the tests following the canonical data#1047
circular-buffer: Update the tests following the canonical data#1047N-Parsons merged 4 commits intoexercism:masterfrom elyssonmr:circular-buffer_update
Conversation
| ) | ||
|
|
||
|
|
||
| # Tests adapted from `problem-specifications//canonical-data.json` @ v1.0.1 |
There was a problem hiding this comment.
Minor formatting point, but can you add a blank line after the version string for consistency?
| def test_read_just_written_item(self): | ||
| buf = CircularBuffer(1) | ||
| buf.write('1') | ||
| self.assertEqual('1', buf.read()) |
There was a problem hiding this comment.
By convention, we use assertEqual(actual, expected) for our tests - can you switch the argument order in all of these tests?
You can check the rest of our conventions in the main README.md.
There was a problem hiding this comment.
Changed then. Thanks to point it out
| buf.write('2') | ||
|
|
||
| def test_alternate_write_and_read(self): | ||
| buf = CircularBuffer(2) |
There was a problem hiding this comment.
Looks like this test has been changed in the canonical data - it should be a CircularBuffer(1).
There was a problem hiding this comment.
Changed that. Thanks
N-Parsons
left a comment
There was a problem hiding this comment.
Looks good overall, but there are a few changes that need to be made before merging.
|
@N-Parsons can you check again? Thanks |
|
Looks good. Thanks, @elyssonmr! |
…ism#1047) * circular-buffer: Update the tests following the canonical data
Update the tests following the
canonical datafrom issue #991