2020-10-09 04:19:07 -05:00
|
|
|
import pytest
|
|
|
|
import requests
|
|
|
|
|
|
|
|
def test_ensure_all_repos_represented():
|
|
|
|
"""
|
|
|
|
Make sure that the 'Technology_Table.md' covers all our repos.
|
|
|
|
"""
|
|
|
|
testresult = True
|
|
|
|
r = requests.get('https://foundation.aninix.net/')
|
|
|
|
body = r.content.__str__()
|
|
|
|
repos = [url for url in body.split('"') if url.startswith('/AniNIX') and not url.find('?') != -1 ]
|
|
|
|
with open('Technology_Table.md') as techtable_file:
|
|
|
|
techtable = techtable_file.read()
|
|
|
|
for repo in repos:
|
|
|
|
try:
|
2022-12-15 12:04:23 -06:00
|
|
|
testresult = (testresult and (techtable.index(repo) != -1))
|
2020-10-09 04:19:07 -05:00
|
|
|
except ValueError as e:
|
|
|
|
print(repo)
|
|
|
|
print(e)
|
|
|
|
testresult = False
|
|
|
|
assert testresult
|