Allow skipping of tests that depend on a modern wcwidth() via an env var

This commit is contained in:
Kovid Goyal
2017-01-10 13:52:15 +05:30
parent 7c5bc672e6
commit 9c501b37ea
3 changed files with 12 additions and 3 deletions

View File

@@ -2,10 +2,11 @@
# vim:fileencoding=utf-8
# License: GPL v3 Copyright: 2016, Kovid Goyal <kovid at kovidgoyal.net>
import os
from functools import partial
from unittest import skipIf
from . import BaseTest
from kitty.fast_data_types import parse_bytes, parse_bytes_dump, CURSOR_BLOCK
@@ -38,6 +39,7 @@ class TestParser(BaseTest):
q.append(('draw', current))
self.ae(tuple(q), cmds)
@skipIf('ANCIENT_WCWIDTH' in os.environ, 'wcwidth() is too old')
def test_simple_parsing(self):
s = self.create_screen()
pb = partial(self.parse_bytes_dump, s)