1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-09-18 19:22:32 +01:00

Fix README and add a test so it won't happen again

This commit is contained in:
mcarton
2015-08-17 16:05:23 +02:00
parent 9b30ae0424
commit bc6b107066
2 changed files with 22 additions and 2 deletions

19
tests/test_readme.py Normal file
View File

@@ -0,0 +1,19 @@
from pathlib import Path
def test_readme():
with open('README.md') as f:
readme = f.read()
bundled = Path(__file__).parent.parent \
.joinpath('thefuck') \
.joinpath('rules') \
.glob('*.py')
for rule in bundled:
if rule.stem != '__init__' and rule.stem not in readme:
raise Exception('Missing rule "{}" in README.md'.format(rule.stem))
if __name__ == '__main__':
test_readme()