You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like ever since the mode argument was surfaced in 06b1b62 a decade ago, it was actually never tested; self.mode was not used in BaseTestReader.
In addition, 3f8c7ca adds support for MODE_FD, but the test suite it added is empty, so it's simply removed here.
This also switches from unittest self.assert*s to plain pytest asserts and pytest.raises()es.
Good catch on the mode test! It looks like the original change was not completely implemented. That said, doing all the different tests with the different modes seems unnecessary. In the maxminddb library, the modes significantly change the behavior, but in this library there is no behavior change besides passing the modes through to maxminddb, which this doesn't even end up confirming. It would be better to have a single test for that. I added this in #179.
In general, I would encourage you to submit a single PR for each change you are proposing. This PR contains several unrelated changes, e.g., moving to pytest asserts, making it hard to review each change individually. Also, for larger changes, it usually makes more sense to discuss them first before making a PR.
e.g., moving to pytest asserts, making it hard to review each change individually.
Had to be done (and in fact it had been done as part of #180, but I wanted to separate this from that refactoring). parametrize doesn't work with unittest based tests, and self.assert* do not exist on non-unittest suites.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It looks like ever since the
modeargument was surfaced in 06b1b62 a decade ago, it was actually never tested;self.modewas not used inBaseTestReader.In addition, 3f8c7ca adds support for
MODE_FD, but the test suite it added is empty, so it's simply removed here.This also switches from unittest
self.assert*s to plain pytest asserts andpytest.raises()es.