Skip to content

Commit de0963c

Browse files
committed
Merge Python 3.8+ tests into main test modules
Now that we require Python 3.8 or later, we don't need to separate Python 3.8+ tests into their own modules.
1 parent 0ddfcea commit de0963c

File tree

6 files changed

+30
-33
lines changed

6 files changed

+30
-33
lines changed

testsuite/N805.py

+8
Original file line numberDiff line numberDiff line change
@@ -179,3 +179,11 @@ class ButWeLostTheOriginalStaticMethodLateDecorator:
179179
async def test(so, exciting):
180180
pass
181181
test = staticmethod(test)
182+
#: Okay
183+
class C:
184+
def __init__(self, a, /, b=None):
185+
pass
186+
#: N805:2:18
187+
class C:
188+
def __init__(this, a, /, b=None):
189+
pass

testsuite/N805_py38.py

-9
This file was deleted.

testsuite/N806.py

+18
Original file line numberDiff line numberDiff line change
@@ -222,3 +222,21 @@ async def test():
222222
async def f():
223223
async with expr as ASYNC_VAR:
224224
pass
225+
#: Okay
226+
def f1(values):
227+
total = 0
228+
partial_sums = [total := total + v for v in values]
229+
return partial_sums, total
230+
#: Okay
231+
GLOBAL_VAR = 0
232+
def f2(values):
233+
global GLOBAL_VAR
234+
partial_sums = [GLOBAL_VAR := GLOBAL_VAR + v for v in values]
235+
return partial_sums, GLOBAL_VAR
236+
#: N806:2:16
237+
def f():
238+
return 1, (BaD_WalRuS := 1), BaD_WalRuS + 1
239+
#: Okay
240+
def f():
241+
(NamedTuple := namedtuple('NamedTuple', 'f1 f2'))
242+
return NamedTuple

testsuite/N806_py38.py

-19
This file was deleted.

testsuite/N816.py

+4
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,7 @@
5353
#: N816
5454
async for γΓ1 in iterator:
5555
pass
56+
#: Okay
57+
lambda f: (TheName := namedtuple('TheName', 'a b c')), TheName
58+
#: N816:1:15:
59+
lambda line: (BaD_WaLRuS := re.match(pattern, line)) and BaD_WaLRuS.group(1)

testsuite/N816_py38.py

-5
This file was deleted.

0 commit comments

Comments
 (0)