diff options
| author | l-m-h@web.de <l-m-h@web.de> | 2017-12-07 12:40:50 +0100 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2017-12-19 06:42:11 -0400 |
| commit | 3444c731d27fd42bbbdaae00af6ca48b4525b03b (patch) | |
| tree | 570bad6704a3ed3b945f10932cbde1e686346699 /test/T390-python.sh | |
| parent | 7a07fd8625e55d425a72af9abe45d99a1d0198cf (diff) | |
python: Rename get_config_list to get_configs
The old name has a bit of a feeling of hungarian notation. Also many
generators in the core are named with the suffix "s" to indicate
iterables: dict.items, dict.keys for example.
Diffstat (limited to 'test/T390-python.sh')
| -rwxr-xr-x | test/T390-python.sh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/T390-python.sh b/test/T390-python.sh index 725a00c9..c6f395e4 100755 --- a/test/T390-python.sh +++ b/test/T390-python.sh @@ -97,22 +97,22 @@ testkey2 = testvalue2 EOF test_expect_equal_file EXPECTED OUTPUT -test_begin_subtest "get_config_list with no match returns empty generator" +test_begin_subtest "get_configs with no match returns empty generator" test_python <<'EOF' import notmuch db = notmuch.Database() -v = db.get_config_list('nonexistent') +v = db.get_configs('nonexistent') print(list(v) == []) EOF test_expect_equal "$(cat OUTPUT)" "True" -test_begin_subtest "get_config_list with no arguments returns all pairs" +test_begin_subtest "get_configs with no arguments returns all pairs" test_python <<'EOF' import notmuch db = notmuch.Database(mode=notmuch.Database.MODE.READ_WRITE) db.set_config("zzzafter", "afterval") db.set_config("aaabefore", "beforeval") -v = db.get_config_list() +v = db.get_configs() for index, keyval in enumerate(v): key, val = keyval print('{}: {} => {}'.format(index, key, val)) @@ -125,13 +125,13 @@ cat <<'EOF' >EXPECTED EOF test_expect_equal_file EXPECTED OUTPUT -test_begin_subtest "get_config_list prefix is used to match keys" +test_begin_subtest "get_configs prefix is used to match keys" test_python <<'EOF' import notmuch db = notmuch.Database(mode=notmuch.Database.MODE.READ_WRITE) db.set_config('testkey1', 'testvalue1') db.set_config('testkey2', 'testvalue2') -v = db.get_config_list('testkey') +v = db.get_configs('testkey') for index, keyval in enumerate(v): key, val = keyval print('{}: {} => {}'.format(index, key, val)) |
