I found when authorized, the ratelimit error message is different from unauthorized.
so i add this.
After studying hard with my 2b colleagues @AnYeMoWang , we finally realized how tests wrote.
😸😸😸😸😸😸😸
Now that we no longer support Python 2.6, we can use the assertRaises()
method of TestCase as a context manager, tiding up a large amount of
technical debt.
See: https://bugs.python.org/issue9400
"Because CalledProcessError extends PyExc_BaseException, which defines a __reduce__ method, that special method cause the pickle load to call the exception type's __init__ method with packed self.args as arguments. So if a subclass of "Exception" needs to behave correctly in pickling, it should make self.args meet its __init__ method's function signature. "
This is a minor thing. It’s a convention, not a rule (obviously)—but it’s also a best practice.
Many text editors look for this kind of comment as the first line—or second line, if there is a shebang (the `#!/usr/bin/env python`, or whatever else)—and make use of this to determine the file’s encoding.