diff options
| author | Victor Uriarte <victor.m.uriarte@intel.com> | 2017-01-22 23:49:49 -0700 |
|---|---|---|
| committer | Victor Uriarte <victor.m.uriarte@intel.com> | 2017-01-22 23:54:27 -0700 |
| commit | e312917f58542b4c202cb5970f72f49e1e8599f9 (patch) | |
| tree | 86a3ae298553e857ef0e0c7ac75ba95318600eca /tests | |
| parent | f6e9141d3131954c7576faf059ceca8a652f3dad (diff) | |
| download | sqlparse-e312917f58542b4c202cb5970f72f49e1e8599f9.tar.gz | |
Add another CLI encoding test
This one I couldn't get to pass on my attempt
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_cli.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_cli.py b/tests/test_cli.py index fd73f60..c1a5a75 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -133,3 +133,11 @@ def test_encoding_stdin_gbk(filepath, load_file, capfd): sys.stdin = old_stdin out, _ = capfd.readouterr() assert out == expected + + +def test_encoding(filepath, capsys): + path = filepath('test_cp1251.sql') + expected = u'insert into foo values (1); -- Песня про надежду\n' + sqlparse.cli.main([path, '--encoding=cp1251']) + out, _ = capsys.readouterr() + assert out == expected |
