diff options
Diffstat (limited to 'test/test_jsinterp.py')
-rw-r--r-- | test/test_jsinterp.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/test_jsinterp.py b/test/test_jsinterp.py index ecd6ab3c9..91b12f544 100644 --- a/test/test_jsinterp.py +++ b/test/test_jsinterp.py @@ -492,10 +492,12 @@ class TestJSInterpreter(unittest.TestCase): jsi = JSInterpreter(''' function x() { let a=/,,[/,913,/](,)}/; "".replace(a, ""); return a; } ''') - attrs = set(('findall', 'finditer', 'flags', 'groupindex', - 'groups', 'match', 'pattern', 'scanner', - 'search', 'split', 'sub', 'subn')) - self.assertTrue(set(dir(jsi.call_function('x'))) > attrs) + attrs = set(('findall', 'finditer', 'match', 'scanner', 'search', + 'split', 'sub', 'subn')) + if sys.version_info >= (2, 7): + # documented for 2.6 but may not be found + attrs.update(('flags', 'groupindex', 'groups', 'pattern')) + self.assertSetEqual(set(dir(jsi.call_function('x'))) & attrs, attrs) jsi = JSInterpreter(''' function x() { let a=/,,[/,913,/](,)}/i; return a; } |