@@ -512,16 +512,14 @@ def test_when_funcs_do_parse_kwargs(self):
512512 assert 'kw_values' not in code
513513
514514 # We do for keyword only args
515- if sys .version_info > (3 , ):
516- code = py2js ('def foo(a, *, b=1, c="foo"): pass' )
517- assert 'parse_kwargs' in code
518- assert 'kw_values' in code
515+ code = py2js ('def foo(a, *, b=1, c="foo"): pass' )
516+ assert 'parse_kwargs' in code
517+ assert 'kw_values' in code
519518
520519 # We do for keyword only args and **kwargs
521- if sys .version_info > (3 , ):
522- code = py2js ('def foo(a, *, b=1, c="foo", **d): pass' )
523- assert 'parse_kwargs' in code
524- assert 'kw_values' in code
520+ code = py2js ('def foo(a, *, b=1, c="foo", **d): pass' )
521+ assert 'parse_kwargs' in code
522+ assert 'kw_values' in code
525523
526524 def test_func1 (self ):
527525 code = py2js (func1 )
@@ -560,7 +558,6 @@ def test_function_call_default_args(self):
560558 assert evalpy (code + 'foo()' ) == '9'
561559 assert evalpy (code + 'd.foo()' ) == '9'
562560
563- @skipif (sys .version_info < (3 ,), reason = 'no keyword only args in legacy py' )
564561 def test_function_call_keyword_only_args (self ):
565562 code = "def foo(*, a=2, b=3, c=4): return a+b+c;\n d = {'foo':foo}\n "
566563 assert evalpy (code + 'foo(a=1, b=2, c=3)' ) == '6'
@@ -615,7 +612,6 @@ def test_function_call_args_and_kwargs(self):
615612 assert evalpy (code + 'foo(1, 2, 3, **{"b":4})' ) == '{ b: 4 }'
616613 assert evalpy (code + 'foo(a=3, **{"b":4})' ) == '{ a: 3, b: 4 }'
617614
618- @skipif (sys .version_info < (3 ,), reason = 'no keyword only args in legacy py' )
619615 def test_function_call_keyword_only_args_and_kwargs (self ):
620616 code = "def foo(*, a=3, b=4, **x): return repr([a, b]) + repr(x);\n d = {'foo':foo}\n "
621617 assert evalpy (code + 'foo(1)' ) == '[3,4]{}'
@@ -790,7 +786,6 @@ def inner():
790786 assert evaljs (py2js (func1 )+ 'func1()' ) == '2'
791787 assert evaljs (py2js (func2 )+ 'func2()' ) == '3'
792788
793- @skipif (sys .version_info < (3 ,), reason = 'no nonlocal on legacy Python' )
794789 def test_nonlocal (self ):
795790 assert py2js ('nonlocal foo;foo = 3' ).strip () == 'foo = 3;'
796791
@@ -804,7 +799,6 @@ def inner():
804799 """
805800 assert evaljs (py2js (func3_code )+ 'func3()' ) == '3'
806801
807- @skipif (sys .version_info < (3 ,), reason = 'no nonlocal on legacy Python' )
808802 def test_global_vs_nonlocal (self ):
809803 js1 = py2js ('global foo;foo = 3' )
810804 js2 = py2js ('nonlocal foo;foo = 3' )
@@ -955,7 +949,7 @@ def addTwo(self):
955949 super ().addTwo ()
956950 self .bar += 1 # haha, we add four!
957951 def addFour (self ):
958- super (MyClass3 , self ).add (4 ) # Use legacy Python syntax
952+ super (MyClass3 , self ).add (4 ) # Use older syntax
959953
960954 code = py2js (MyClass1 ) + py2js (MyClass2 ) + py2js (MyClass3 )
961955 code += 'var m1=new MyClass1(), m2=new MyClass2(), m3=new MyClass3();'
0 commit comments