Skip to content

Commit

Permalink
Merge Python 3.8+ tests into main test modules
Browse files Browse the repository at this point in the history
Now that we require Python 3.8 or later, we don't need to separate
Python 3.8+ tests into their own modules.
  • Loading branch information
jparise committed Oct 22, 2023
1 parent 0ddfcea commit de0963c
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 33 deletions.
8 changes: 8 additions & 0 deletions testsuite/N805.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,3 +179,11 @@ class ButWeLostTheOriginalStaticMethodLateDecorator:
async def test(so, exciting):
pass
test = staticmethod(test)
#: Okay
class C:
def __init__(self, a, /, b=None):
pass
#: N805:2:18
class C:
def __init__(this, a, /, b=None):
pass
9 changes: 0 additions & 9 deletions testsuite/N805_py38.py

This file was deleted.

18 changes: 18 additions & 0 deletions testsuite/N806.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,3 +222,21 @@ async def test():
async def f():
async with expr as ASYNC_VAR:
pass
#: Okay
def f1(values):
total = 0
partial_sums = [total := total + v for v in values]
return partial_sums, total
#: Okay
GLOBAL_VAR = 0
def f2(values):
global GLOBAL_VAR
partial_sums = [GLOBAL_VAR := GLOBAL_VAR + v for v in values]
return partial_sums, GLOBAL_VAR
#: N806:2:16
def f():
return 1, (BaD_WalRuS := 1), BaD_WalRuS + 1
#: Okay
def f():
(NamedTuple := namedtuple('NamedTuple', 'f1 f2'))
return NamedTuple
19 changes: 0 additions & 19 deletions testsuite/N806_py38.py

This file was deleted.

4 changes: 4 additions & 0 deletions testsuite/N816.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,7 @@
#: N816
async for γΓ1 in iterator:
pass
#: Okay
lambda f: (TheName := namedtuple('TheName', 'a b c')), TheName
#: N816:1:15:
lambda line: (BaD_WaLRuS := re.match(pattern, line)) and BaD_WaLRuS.group(1)
5 changes: 0 additions & 5 deletions testsuite/N816_py38.py

This file was deleted.

0 comments on commit de0963c

Please sign in to comment.