mirror of
https://github.com/nvbn/thefuck.git
synced 2025-02-22 12:58:33 +00:00
18 lines
491 B
Python
18 lines
491 B
Python
from pathlib import Path
|
|
|
|
|
|
def test_readme():
|
|
project_root = Path(__file__).parent.parent
|
|
with project_root.joinpath('README.md').open() as f:
|
|
readme = f.read()
|
|
|
|
bundled = project_root \
|
|
.joinpath('thefuck') \
|
|
.joinpath('rules') \
|
|
.glob('*.py')
|
|
|
|
for rule in bundled:
|
|
if rule.stem != '__init__':
|
|
assert rule.stem in readme,\
|
|
'Missing rule "{}" in README.md'.format(rule.stem)
|