From 1b7af1e63f7a498835917bd76384ec68b744afc9 Mon Sep 17 00:00:00 2001 From: yo mama Date: Sat, 12 Sep 2015 10:50:24 -0700 Subject: added gradient --- Pb/__init__.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Pb/__init__.py') diff --git a/Pb/__init__.py b/Pb/__init__.py index 6485e86..af4558f 100644 --- a/Pb/__init__.py +++ b/Pb/__init__.py @@ -106,4 +106,12 @@ class Pb(object): def err_fatal(self, s): sys.stderr.write("ERROR[FATAL]:{} - {}\n".format(self.__class__.__name__, s)) sys.exit(1); + + @classmethod + def test(cls, test_params=None): + test_params = test_params or cls._test_params + if not test_params: + raise AttributeError ("Must supply test params to test %s" % cls.__name__) + b = cls(**test_params) + b.create(); -- cgit v1.2.3-70-g09d2