Kaydet (Commit) b749ee14 authored tarafından Batuhan Taşkaya's avatar Batuhan Taşkaya

Add new test cases, examples and pep276 to readme

üst 9a255657
......@@ -4,6 +4,7 @@ See what happens if a pep was accepted.
## Supporteds
- PEP211
- PEP231
- PEP276
- PEP313
## Demo
[![asciicast](https://asciinema.org/a/239257.svg)](https://asciinema.org/a/239257)
......
......@@ -4,15 +4,32 @@ from pepallow.peps.p231 import AssetBean as Bean
with Allow(211):
s = [1, 2, 3]
t = "abc"
product = []
counter = 0
for i, j in s @ t:
print(f"{i}{j}")
product.append(f"{i}{j}")
counter += 1
assert counter == 9
assert product == ['1a', '1b', '1c', '2a', '2b', '2c', '3a', '3b', '3c']
with Allow(231):
b = Bean(3)
assert b.foo == 3
b.foo = 4
assert b.foo == 4
with Allow(276):
counter = 0
items = []
for number in 10:
items.append(number)
counter += 1
assert counter == 10
assert sum(items) == 45
with Allow(313):
assert IV + I == V
assert VI + M == 1006
......
......@@ -4,7 +4,17 @@ from pepallow.peps.p231 import AssetBean as Bean
def test_pep211():
with Allow(211):
pass
s = [1, 2, 3]
t = "abc"
product = []
counter = 0
for i, j in s @ t:
product.append(f"{i}{j}")
counter += 1
assert counter == 9
assert product == ['1a', '1b', '1c', '2a', '2b', '2c', '3a', '3b', '3c']
def test_pep231():
......@@ -14,6 +24,17 @@ def test_pep231():
b.foo = 4
assert b.foo == 4
def test_pep276():
with Allow(276):
counter = 0
items = []
for number in 10:
items.append(number)
counter += 1
assert counter == 10
assert sum(items) == 45
def test_pep313():
with Allow(313):
assert IV + I == V
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment