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

add example

üst f8622cff
# PEPAllow
![pepalllow](pepallow.png)
See what happens if a pep was accepted.
## Supporteds
- PEP211
......
from pepallow.allow import Allow
from pepallow.peps.p231 import AssetBean as Bean
with Allow(211):
pass
with Allow(231):
b = Bean(3)
assert b.foo == 3
b.foo = 4
assert b.foo == 4
with Allow(313):
assert IV + I == V
assert VI + M == 1006
assert (M - D) + VI - X == (500) + 6 - 10
......@@ -8,7 +8,7 @@ with open(current_dir / "README.md", encoding="utf-8") as f:
setup(
name="pepallow",
version="0.1.1",
version="0.1.2",
packages=find_packages(),
url="https://github.com/abstractequalsmagic/pepallow",
description = "Hack the interpreter for running rejected pep's changes.",
......
......@@ -4,11 +4,7 @@ from pepallow.peps.p231 import AssetBean as Bean
def test_pep211():
with Allow(211):
assert IV == 4
assert M == 1000
assert (M - D) + VI == 506
with pytest.raises(AssertionError):
assert VI == 5
pass
def test_pep231():
......
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