diff tests/test_configuration.py @ 440:32c7c2d219d2

performance: Refactor how data is managed to reduce copying. * Make use of `collections.abc.Mapping` to better identify things that are supposed to look like dictionaries. * Instead of handling "overlay" of data in a dict tree in each different data object, make all objects `Mapping`s and handle merging at a higher level with the new `MergedMapping` object. * Since this new object is read-only, remove the need for deep-copying of app and page configurations. * Split data classes into separate modules.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 28 Jun 2015 08:22:39 -0700
parents f98451237371
children 7e51d14097cb
line wrap: on
line diff
--- a/tests/test_configuration.py	Sat Jun 27 22:28:32 2015 -0700
+++ b/tests/test_configuration.py	Sun Jun 28 08:22:39 2015 -0700
@@ -13,13 +13,13 @@
     ])
 def test_config_init(values, expected):
     config = Configuration(values)
-    assert config.get() == expected
+    assert config.getAll() == expected
 
 
 def test_config_set_all():
     config = Configuration()
     config.setAll({'foo': 'bar'})
-    assert config.get() == {'foo': 'bar'}
+    assert config.getAll() == {'foo': 'bar'}
 
 
 def test_config_get_and_set():
@@ -125,7 +125,7 @@
                 'child10': 'ten'
                 }
             }
-    assert config.get() == expected
+    assert config.getAll() == expected
 
 
 def test_ordered_loader():