diff options
author | Jon Dufresne <jon.dufresne@gmail.com> | 2019-11-02 18:13:55 -0700 |
---|---|---|
committer | Paul McGuire <ptmcg@users.noreply.github.com> | 2019-11-02 20:13:55 -0500 |
commit | 4899103af26ec992ab04d8d222cfb8efe4740e2d (patch) | |
tree | 4eeadd21eba447bf45a5c4748a4c8ec0869862e7 | |
parent | 6a39aa47c7451584e9fe6c4f4bcd33f522f54d5d (diff) | |
download | pyparsing-git-4899103af26ec992ab04d8d222cfb8efe4740e2d.tar.gz |
Use classmethod decorator (#159)
Available since Python 2.4.
https://docs.python.org/3/library/functions.html#classmethod
-rw-r--r-- | tests/test_unit.py | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/tests/test_unit.py b/tests/test_unit.py index 4af9bd3..d107e9d 100644 --- a/tests/test_unit.py +++ b/tests/test_unit.py @@ -2939,33 +2939,25 @@ class Test2_WithoutPackrat(TestParseResultsAsserts): return class CallableC3: - # ~ @classmethod + @classmethod def __call__(cls, s, l, t): return t - __call__ = classmethod(__call__) - class CallableC2: - # ~ @classmethod + @classmethod def __call__(cls, l, t): return t - __call__ = classmethod(__call__) - class CallableC1: - # ~ @classmethod + @classmethod def __call__(cls, t): return t - __call__ = classmethod(__call__) - class CallableC0: - # ~ @classmethod + @classmethod def __call__(cls): return - __call__ = classmethod(__call__) - class parseActionHolder: @staticmethod def pa3(s, l, t): |