-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #181 from AndrewG0R/master
Adding tests for simple constructions support
- Loading branch information
Showing
49 changed files
with
370 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
...urces/org/polystat/py2eo/transpiler/simple-tests/arithmetic-conversion/conversion-10.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
disabled: True | ||
python: | | ||
def test(): | ||
x = 5 | ||
y = 3.14 | ||
z = x - complex(x, y) | ||
return z.__class__ == complex and z.imag.__class__ == z.real.__class__ |
9 changes: 9 additions & 0 deletions
9
...urces/org/polystat/py2eo/transpiler/simple-tests/arithmetic-conversion/conversion-11.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
disabled: True | ||
python: | | ||
def test(): | ||
x = 5.15 | ||
y = 3.14 | ||
z = x * complex(x, y) | ||
return z.__class__ == complex and z.imag.__class__ == z.real.__class__ |
9 changes: 9 additions & 0 deletions
9
...urces/org/polystat/py2eo/transpiler/simple-tests/arithmetic-conversion/conversion-12.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
disabled: True | ||
python: | | ||
def test(): | ||
x = 5.15 | ||
y = 3.14 | ||
z = x / complex(x, y) | ||
return z.__class__ == complex and z.imag.__class__ == z.real.__class__ |
9 changes: 9 additions & 0 deletions
9
...urces/org/polystat/py2eo/transpiler/simple-tests/arithmetic-conversion/conversion-13.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
disabled: True | ||
python: | | ||
def test(): | ||
x = 5.15 | ||
y = 3.14 | ||
z = x ** complex(x, y) | ||
return z.__class__ == complex and z.imag.__class__ == z.real.__class__ |
9 changes: 9 additions & 0 deletions
9
...urces/org/polystat/py2eo/transpiler/simple-tests/arithmetic-conversion/conversion-14.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
disabled: True | ||
python: | | ||
def test(): | ||
x = 5.15 | ||
y = 3 | ||
z = x * complex(x, y) | ||
return z.__class__ == complex and z.imag.__class__ == z.real.__class__ |
8 changes: 8 additions & 0 deletions
8
...urces/org/polystat/py2eo/transpiler/simple-tests/arithmetic-conversion/conversion-15.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
disabled: True | ||
python: | | ||
def test(): | ||
x = 5 | ||
y = 3.14 | ||
z = x - complex(x, y) | ||
return z.__class__ == complex and z.imag.__class__ == z.real.__class__ |
8 changes: 8 additions & 0 deletions
8
...urces/org/polystat/py2eo/transpiler/simple-tests/arithmetic-conversion/conversion-16.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
disabled: True | ||
python: | | ||
def test(): | ||
x = 5 | ||
y = 3.14 | ||
z = y + complex(x, y) | ||
return z.__class__ == complex and z.imag.__class__ == z.real.__class__ |
8 changes: 8 additions & 0 deletions
8
...urces/org/polystat/py2eo/transpiler/simple-tests/arithmetic-conversion/conversion-17.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
disabled: True | ||
python: | | ||
def test(): | ||
x = 5 | ||
y = 3.14 | ||
z = y * complex(x, y) | ||
return z.__class__ == complex and z.imag.__class__ == z.real.__class__ |
8 changes: 8 additions & 0 deletions
8
...urces/org/polystat/py2eo/transpiler/simple-tests/arithmetic-conversion/conversion-18.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
disabled: True | ||
python: | | ||
def test(): | ||
x = 5 | ||
y = 3.14 | ||
z = y / complex(x, y) | ||
return z.__class__ == complex and z.imag.__class__ == z.real.__class__ |
8 changes: 8 additions & 0 deletions
8
...urces/org/polystat/py2eo/transpiler/simple-tests/arithmetic-conversion/conversion-19.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
disabled: True | ||
python: | | ||
def test(): | ||
x = 5 | ||
y = 3.14 | ||
z = y ** complex(x, y) | ||
return z.__class__ == complex and z.imag.__class__ == z.real.__class__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
...urces/org/polystat/py2eo/transpiler/simple-tests/arithmetic-conversion/conversion-20.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
disabled: True | ||
python: | | ||
def test(): | ||
x = 5 | ||
y = 3 | ||
z = y ** complex(x, y) | ||
return z.__class__ == complex and z.imag.__class__ == z.real.__class__ |
8 changes: 8 additions & 0 deletions
8
...ources/org/polystat/py2eo/transpiler/simple-tests/arithmetic-conversion/conversion-3.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
disabled: True | ||
python: | | ||
def test(): | ||
num_int = 123 | ||
num_flo = 1.23 | ||
num_new = num_int * num_flo | ||
return num_new.__class__ == float |
8 changes: 8 additions & 0 deletions
8
...ources/org/polystat/py2eo/transpiler/simple-tests/arithmetic-conversion/conversion-4.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
disabled: True | ||
python: | | ||
def test(): | ||
num_int = 123 | ||
num_flo = 1.23 | ||
num_new = num_int / num_flo | ||
return num_new.__class__ == float |
9 changes: 9 additions & 0 deletions
9
...ources/org/polystat/py2eo/transpiler/simple-tests/arithmetic-conversion/conversion-5.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
disabled: True | ||
python: | | ||
def test(): | ||
num_int = 123 | ||
num_flo = 1.23 | ||
num_int_2 = 13 | ||
num_new = num_int * num_flo - num_int_2 | ||
return num_new.__class__ == int |
8 changes: 8 additions & 0 deletions
8
...ources/org/polystat/py2eo/transpiler/simple-tests/arithmetic-conversion/conversion-6.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
disabled: True | ||
python: | | ||
def test(): | ||
x = 5 | ||
y = 3 | ||
z = x - complex(x, y) | ||
return z.__class__ == complex |
8 changes: 8 additions & 0 deletions
8
...ources/org/polystat/py2eo/transpiler/simple-tests/arithmetic-conversion/conversion-7.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
disabled: True | ||
python: | | ||
def test(): | ||
x = 5 | ||
y = 3.14 | ||
z = x - complex(x, y) | ||
return z.__class__ == complex and z.imag.__class__ == z.real.__class__ |
9 changes: 9 additions & 0 deletions
9
...ources/org/polystat/py2eo/transpiler/simple-tests/arithmetic-conversion/conversion-8.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
disabled: True | ||
python: | | ||
def test(): | ||
x = 5.15 | ||
y = 3.14 | ||
z = x - complex(x, y) | ||
return z.__class__ == complex and z.imag.__class__ == z.real.__class__ |
8 changes: 8 additions & 0 deletions
8
...ources/org/polystat/py2eo/transpiler/simple-tests/arithmetic-conversion/conversion-9.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
disabled: True | ||
python: | | ||
def test(): | ||
x = 5 | ||
y = 3.14 | ||
z = x - complex(x, y) | ||
return z.__class__ == complex and z.imag.__class__ == z.real.__class__ |
13 changes: 13 additions & 0 deletions
13
...resources/org/polystat/py2eo/transpiler/simple-tests/attribute-reference/attribute-1.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
disabled: True | ||
python: | | ||
def test(): | ||
class emp: | ||
def __init__(self): | ||
self.name = 'xyz' | ||
self.salary = 4000 | ||
def show(self): | ||
print(self.name) | ||
print(self.salary) | ||
return len(vars(emp())) == 2 |
8 changes: 8 additions & 0 deletions
8
...resources/org/polystat/py2eo/transpiler/simple-tests/attribute-reference/attribute-2.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
disabled: True | ||
python: | | ||
def test(): | ||
class A: | ||
a = 123 | ||
x = A() | ||
return x.a.__class__ == int |
10 changes: 10 additions & 0 deletions
10
...resources/org/polystat/py2eo/transpiler/simple-tests/attribute-reference/attribute-3.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
disabled: True | ||
python: | | ||
def test(): | ||
class A: | ||
a = 123 | ||
x = A() | ||
x.a = 13 | ||
return x.a.__class__ == int and x.a != 123 |
7 changes: 7 additions & 0 deletions
7
...rc/test/resources/org/polystat/py2eo/transpiler/simple-tests/comparison/comparison-2.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
disabled: True | ||
python: | | ||
def test(): | ||
x = 5.15 | ||
y = 3 | ||
return y.__class__ is int and x.__class__ == float and y.__class__ is not x.__class__ |
4 changes: 4 additions & 0 deletions
4
...rc/test/resources/org/polystat/py2eo/transpiler/simple-tests/comparison/comparison-3.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
disabled: True | ||
python: | | ||
def test(): | ||
return 1 in {'name': 'John', 1: [2, 4, 3]}.keys() |
4 changes: 4 additions & 0 deletions
4
...rc/test/resources/org/polystat/py2eo/transpiler/simple-tests/comparison/comparison-4.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
disabled: True | ||
python: | | ||
def test(): | ||
return 'c' in 'some char' |
4 changes: 4 additions & 0 deletions
4
...rc/test/resources/org/polystat/py2eo/transpiler/simple-tests/comparison/comparison-5.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
disabled: True | ||
python: | | ||
def test(): | ||
return 9 in [x * x for x in range(1, 6) if (x % 2) == 1] |
4 changes: 4 additions & 0 deletions
4
...rc/test/resources/org/polystat/py2eo/transpiler/simple-tests/comparison/comparison-6.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
disabled: True | ||
python: | | ||
def test(): | ||
return 26 not in { x * x for x in range(1, 6) if (x % 2) == 1 } |
8 changes: 8 additions & 0 deletions
8
...rc/test/resources/org/polystat/py2eo/transpiler/simple-tests/comparison/comparison-7.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
disabled: True | ||
python: | | ||
def test(): | ||
test_dict1 = {'gfg': 1, 'is': 2, 'best': 3, 'for': 4, 'CS': 5} | ||
test_dict2 = {'gfg': 1, 'is': 2, 'best': 3} | ||
res = all(test_dict1.get(key, None) == val for key, val | ||
in test_dict2.items()) | ||
return res |
4 changes: 4 additions & 0 deletions
4
...iler/src/test/resources/org/polystat/py2eo/transpiler/simple-tests/dictionary/dict-1.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
disabled: True | ||
python: | | ||
def test(): | ||
return len({'name': 'John', 1: [2, 4, 3]}) == 2 |
4 changes: 4 additions & 0 deletions
4
...iler/src/test/resources/org/polystat/py2eo/transpiler/simple-tests/dictionary/dict-2.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
disabled: True | ||
python: | | ||
def test(): | ||
return {'name': 'John', 1: [2, 4, 3]}.get('name') == "John" |
4 changes: 4 additions & 0 deletions
4
...iler/src/test/resources/org/polystat/py2eo/transpiler/simple-tests/dictionary/dict-3.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
disabled: True | ||
python: | | ||
def test(): | ||
return {'name': 'John', 1: [2, 4, 3]}.get(1).__class__ == list |
12 changes: 12 additions & 0 deletions
12
...iler/src/test/resources/org/polystat/py2eo/transpiler/simple-tests/dictionary/dict-4.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
disabled: True | ||
python: | | ||
def test(): | ||
class A: | ||
a = 123 | ||
x = A() | ||
x.a = 13 | ||
dict = {'name': 'John', 1: x} | ||
return dict.get(1).__class__ == A |
15 changes: 15 additions & 0 deletions
15
...test/resources/org/polystat/py2eo/transpiler/simple-tests/generator-expression/gen-1.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
disabled: True | ||
python: | | ||
def test(): | ||
checkStr = 'The First Message' | ||
def my_gen(): | ||
n = 1 | ||
yield n | ||
n += 1 | ||
yield n | ||
n += 1 | ||
yield n | ||
return next(my_gen()) == 1 |
13 changes: 13 additions & 0 deletions
13
...test/resources/org/polystat/py2eo/transpiler/simple-tests/generator-expression/gen-2.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
disabled: True | ||
python: | | ||
def test(): | ||
checkStr = 'Hello World!!!' | ||
def rev_str(): | ||
length = len(checkStr) | ||
for i in range(length - 1, -1, -1): | ||
yield checkStr[i] | ||
resList = [] | ||
[resList.append(i) for i in rev_str()] | ||
return len(resList) == len(list(checkStr)) |
7 changes: 7 additions & 0 deletions
7
...test/resources/org/polystat/py2eo/transpiler/simple-tests/generator-expression/gen-3.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
disabled: True | ||
python: | | ||
def test(): | ||
my_list = [10, 6, 6, 10] | ||
a = (x ** 2 for x in my_list) | ||
return next(a) == 100 |
14 changes: 14 additions & 0 deletions
14
...test/resources/org/polystat/py2eo/transpiler/simple-tests/generator-expression/gen-4.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
disabled: True | ||
python: | | ||
def test(): | ||
def fibonacci_numbers(nums): | ||
x, y = 0, 1 | ||
for _ in range(nums): | ||
x, y = y, x + y | ||
yield x | ||
def square(nums): | ||
for num in nums: | ||
yield num ** 2 | ||
return sum(square(fibonacci_numbers(10))) == 4895 |
7 changes: 7 additions & 0 deletions
7
...test/resources/org/polystat/py2eo/transpiler/simple-tests/generator-expression/gen-5.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
disabled: True | ||
python: | | ||
def test(): | ||
my_list = [10, 3, 6, 10] | ||
generator = (x**2 for x in my_list) | ||
return generator.__next__() == 100 |
6 changes: 6 additions & 0 deletions
6
transpiler/src/test/resources/org/polystat/py2eo/transpiler/simple-tests/lambda/lambda2.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
disabled: True | ||
python: | | ||
def lambda1(): | ||
my_list = [1, 5, 4, 6, 8, 11, 3, 12] | ||
new_list = list(filter(lambda x: (x%2 == 0) , my_list)) | ||
return len(new_list) == 4 |
6 changes: 6 additions & 0 deletions
6
transpiler/src/test/resources/org/polystat/py2eo/transpiler/simple-tests/lambda/lambda3.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
disabled: True | ||
python: | | ||
def lambda1(): | ||
my_list = [1, 5, 4, 6, 8, 11, 3, 12] | ||
new_list = list(map(lambda x: x * 2, my_list)) | ||
return len(new_list) == 8 |
Oops, something went wrong.
f16f10f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't able to retrieve PDD puzzles from the code base and submit them to GitHub. If you think that it's a bug on our side, please submit it to yegor256/0pdd:
Please, copy and paste this stack trace to GitHub: