diff options
| author | yo mama <pepper@scannerjammer.com> | 2015-09-12 10:50:24 -0700 |
|---|---|---|
| committer | yo mama <pepper@scannerjammer.com> | 2015-09-12 10:50:24 -0700 |
| commit | 1b7af1e63f7a498835917bd76384ec68b744afc9 (patch) | |
| tree | 379395a265565220f8915895e98abaca6d00998f /Pb/__init__.py | |
| parent | 13912c0060a3d234d639f7aa70cd170cc51420a8 (diff) | |
added gradient
Diffstat (limited to 'Pb/__init__.py')
| -rw-r--r-- | Pb/__init__.py | 8 |
1 files changed, 8 insertions, 0 deletions
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(); |
