Show More
@@ -20,6 +20,7 b' Authors:' | |||||
20 | #----------------------------------------------------------------------------- |
|
20 | #----------------------------------------------------------------------------- | |
21 |
|
21 | |||
22 | import os |
|
22 | import os | |
|
23 | import pickle | |||
23 | import sys |
|
24 | import sys | |
24 | from tempfile import mkstemp |
|
25 | from tempfile import mkstemp | |
25 | from unittest import TestCase |
|
26 | from unittest import TestCase | |
@@ -289,4 +290,10 b' class TestConfig(TestCase):' | |||||
289 | self.assertIn('Foo.bar', c2) |
|
290 | self.assertIn('Foo.bar', c2) | |
290 | self.assertNotIn('Foo.bar', c1) |
|
291 | self.assertNotIn('Foo.bar', c1) | |
291 |
|
292 | |||
|
293 | def test_pickle_config(self): | |||
|
294 | cfg = Config() | |||
|
295 | cfg.Foo.bar = 1 | |||
|
296 | pcfg = pickle.dumps(cfg) | |||
|
297 | cfg2 = pickle.loads(pcfg) | |||
|
298 | self.assertEqual(cfg2, cfg) | |||
292 |
|
299 |
General Comments 0
You need to be logged in to leave comments.
Login now