diff options
| author | Tres Seaver <tseaver@palladion.com> | 2009-04-29 18:00:36 +0000 |
|---|---|---|
| committer | Tres Seaver <tseaver@palladion.com> | 2009-04-29 18:00:36 +0000 |
| commit | 67b5b39d0510d1485593c92579e98a3f7a8f29ce (patch) | |
| tree | a0abf86325db68badc3c3b725d23613af3d778db | |
| parent | 08c675947056a0a483049927cb9bea52f865c716 (diff) | |
| download | pyramid-67b5b39d0510d1485593c92579e98a3f7a8f29ce.tar.gz pyramid-67b5b39d0510d1485593c92579e98a3f7a8f29ce.tar.bz2 pyramid-67b5b39d0510d1485593c92579e98a3f7a8f29ce.zip | |
Coverage: edge case where pickled action doesn't have a set as fifth element.
| -rw-r--r-- | repoze/bfg/tests/test_zcml.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/repoze/bfg/tests/test_zcml.py b/repoze/bfg/tests/test_zcml.py index 50d8a468a..67cb40cb1 100644 --- a/repoze/bfg/tests/test_zcml.py +++ b/repoze/bfg/tests/test_zcml.py @@ -599,6 +599,19 @@ class TestZCMLPickling(unittest.TestCase): cPickle.dump(data, open(picklename, 'wb')) self.assertEqual(False, zcml_configure('configure.zcml', self.module)) + def test_zcml_configure_uses_file_configure_with_bad_actions2(self): + import cPickle + import os + import time + from repoze.bfg.zcml import zcml_configure + from repoze.bfg.zcml import PVERSION + picklename = os.path.join(self.packagepath, 'configure.zcml.cache') + f = open(picklename, 'wb') + actions = [(None, None, None, None, None)] + data = (PVERSION, time.time()+500, actions) + cPickle.dump(data, open(picklename, 'wb')) + self.assertEqual(False, zcml_configure('configure.zcml', self.module)) + def test_zcml_configure_uses_good_pickle(self): import os import cPickle |
