diff options
author | Joakim Koljonen <koljonen@outlook.com> | 2017-03-06 00:24:41 +0100 |
---|---|---|
committer | Joakim Koljonen <koljonen@outlook.com> | 2017-03-15 02:57:18 +0100 |
commit | d67329279f1c929d401770764a89b2c7415c75b7 (patch) | |
tree | 680fffabfc71c4082be9d7e33723770865a40d99 /tests/metadata.py | |
parent | 83a1661ed383c24c911a30054f8f8e5c2808e138 (diff) |
Deduplicate tests: add metadata.qual, metadata.no_qual
Put some commonly used settings for the completer parametrization
in metadata.py to avoid repeating them for a bunch of tests.
Diffstat (limited to 'tests/metadata.py')
-rw-r--r-- | tests/metadata.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/metadata.py b/tests/metadata.py index c8a0ff4c..b62b8777 100644 --- a/tests/metadata.py +++ b/tests/metadata.py @@ -4,10 +4,15 @@ from functools import partial from itertools import product from prompt_toolkit.document import Document from mock import Mock +import pytest escape = lambda name: ('"' + name + '"' if not name.islower() or name in ( 'select', 'insert') else name) +parametrize = pytest.mark.parametrize +qual = ['if_more_than_one_table', 'always'] +no_qual = ['if_more_than_one_table', 'never'] + def completion(display_meta, text, pos=0): return Completion(text, start_position=pos, display_meta=display_meta) |