diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-12-23 12:33:48 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-12-25 08:18:14 +0000 |
commit | 1d4908ddb224ccc7e018b485e8e52d7ec2b70b81 (patch) | |
tree | 3e43bdd71aae5df8fb36dc2d21e2a5dd35529a62 /bitbake/lib/bb/tests/data.py | |
parent | 4d06fb730798297c994961dfb0f9b601fa618c3b (diff) | |
download | openembedded-core-contrib-1d4908ddb224ccc7e018b485e8e52d7ec2b70b81.tar.gz |
bitbake: tests/data: Add a key deletion test
If you copy the datastore, then delete a key, it should not exist in
d.keys(). This adds a test to cover the recently found data store bug.
(Bitbake rev: 16d5f40ad20fd08bf7a4d0e36200c739b5a9f59e)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/tests/data.py')
-rw-r--r-- | bitbake/lib/bb/tests/data.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bitbake/lib/bb/tests/data.py b/bitbake/lib/bb/tests/data.py index 9b09ff4c61..81e4091ff7 100644 --- a/bitbake/lib/bb/tests/data.py +++ b/bitbake/lib/bb/tests/data.py @@ -121,6 +121,12 @@ class DataExpansions(unittest.TestCase): keys = self.d.keys() self.assertEqual(keys, ['value_of_foo', 'foo', 'bar']) + def test_keys_deletion(self): + newd = bb.data.createCopy(self.d) + newd.delVar("bar") + keys = newd.keys() + self.assertEqual(keys, ['value_of_foo', 'foo']) + class TestNestedExpansions(unittest.TestCase): def setUp(self): self.d = bb.data.init() |