summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Bachelier <laurent@bachelier.name>2011-06-11 22:34:28 +0200
committerLaurent Bachelier <laurent@bachelier.name>2011-06-11 22:34:28 +0200
commitd44183378b359a04db72ca74a1a2401fc4ec6b06 (patch)
tree33315343f3822d513a511f434328671939f5fa07
parentFix instance checks (diff)
downloadffs-d44183378b359a04db72ca74a1a2401fc4ec6b06.tar.xz
Add tests for tree copying
i.e. setting a value from a Dict, instead of a dict
-rw-r--r--test.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/test.py b/test.py
index 1d3560e..15b3aac 100644
--- a/test.py
+++ b/test.py
@@ -94,3 +94,10 @@ class FfsTest(TestCase):
lst1n['lulz'] = {}
assert 'cat' not in lst1['lulz']
assert 'cat' not in lst1n['lulz']
+
+ def test_copyTrees(self):
+ rtr = Router(lol=Router(cat=str), lulz=Router(cat=str))
+ lst1 = Dict(self.root, rtr)
+ lst1['lulz'] = lst1['lol']
+ assert 'cat' in lst1['lulz']
+ assert lst1['lulz']['cat'] == "hello"