From c0d37b030be0f47b4edd42c86f94a32c9bc7da6c Mon Sep 17 00:00:00 2001 From: marscher Date: Fri, 15 Jun 2018 19:43:58 +0200 Subject: [PATCH] eat it py27... --- pyemma/coordinates/tests/test_readers.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pyemma/coordinates/tests/test_readers.py b/pyemma/coordinates/tests/test_readers.py index 05ca34c2f..0bdddcb21 100644 --- a/pyemma/coordinates/tests/test_readers.py +++ b/pyemma/coordinates/tests/test_readers.py @@ -24,7 +24,14 @@ def max_chunksize_from_config(itemsize): class GenerateTestMatrix(type): def __new__(mcs, name, bases, attr): - from functools import partialmethod + from functools import partial + + class partialmethod(partial): + def __get__(self, instance, owner): + if instance is None: + return self + return partial(self.func, instance, + *(self.args or ()), **(self.keywords or {})) new_test_methods = {} test_templates = {k: v for k, v in attr.items() if k.startswith('_test') }