check_support; Attribute()
This commit is contained in:
@@ -13,6 +13,7 @@ def test_constant():
|
||||
x = 2
|
||||
print(x == 2)
|
||||
"""
|
||||
<callable> : print
|
||||
True : x == 2
|
||||
None : print(x == 2)
|
||||
"""
|
||||
@@ -64,7 +65,7 @@ def test_if():
|
||||
def test_for():
|
||||
|
||||
with closing(StringIO()) as f:
|
||||
@Commentor(f)
|
||||
@Commentor(f, _exit=False, check=False)
|
||||
def target():
|
||||
odds = []
|
||||
# return only odd numbers - 1,3,5,7,9
|
||||
@@ -101,6 +102,8 @@ def test_for():
|
||||
# continue # skipped
|
||||
# odds.append(x)
|
||||
"""
|
||||
[] : odds
|
||||
<callable> : odds.append
|
||||
1 : x
|
||||
None : odds.append(x)
|
||||
"""
|
||||
@@ -125,6 +128,8 @@ def test_for():
|
||||
# continue # skipped
|
||||
# odds.append(x)
|
||||
"""
|
||||
[1] : odds
|
||||
<callable> : odds.append
|
||||
3 : x
|
||||
None : odds.append(x)
|
||||
"""
|
||||
@@ -149,6 +154,8 @@ def test_for():
|
||||
# continue # skipped
|
||||
# odds.append(x)
|
||||
"""
|
||||
[1, 3] : odds
|
||||
<callable> : odds.append
|
||||
5 : x
|
||||
None : odds.append(x)
|
||||
"""
|
||||
@@ -173,6 +180,8 @@ def test_for():
|
||||
# continue # skipped
|
||||
# odds.append(x)
|
||||
"""
|
||||
[1, 3, 5] : odds
|
||||
<callable> : odds.append
|
||||
7 : x
|
||||
None : odds.append(x)
|
||||
"""
|
||||
@@ -197,6 +206,8 @@ def test_for():
|
||||
continue # skipped
|
||||
odds.append(x)
|
||||
"""
|
||||
[1, 3, 5, 7] : odds
|
||||
<callable> : odds.append
|
||||
9 : x
|
||||
None : odds.append(x)
|
||||
"""
|
||||
|
||||
@@ -17,7 +17,7 @@ def test_return():
|
||||
|
||||
with closing(StringIO()) as f:
|
||||
|
||||
@Commentor(f)
|
||||
@Commentor(f, _exit=False)
|
||||
def target():
|
||||
a = 1
|
||||
return a + 1
|
||||
|
||||
@@ -46,6 +46,7 @@ def test_call_print():
|
||||
def target():
|
||||
print('This line will be printed.')
|
||||
"""
|
||||
<callable> : print
|
||||
None : print('This line will be printed.')
|
||||
"""
|
||||
''')
|
||||
|
||||
@@ -14,6 +14,7 @@ def test_assign():
|
||||
myint = 7
|
||||
print(myint)
|
||||
"""
|
||||
<callable> : print
|
||||
7 : myint
|
||||
None : print(myint)
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user