Match test requirements by full package name. (#9764)

pull/7358/merge
Andrey 2017-10-09 06:49:51 +03:00 committed by Paulus Schoutsen
parent b620c433c0
commit 2a2ee81957
1 changed files with 9 additions and 7 deletions

View File

@ -40,7 +40,6 @@ TEST_REQUIREMENTS = (
'ephem',
'evohomeclient',
'feedparser',
'forecastio',
'fuzzywuzzy',
'gTTS-token',
'ha-ffmpeg',
@ -51,15 +50,16 @@ TEST_REQUIREMENTS = (
'libpurecoollink',
'libsoundtouch',
'mficlient',
'nx584',
'paho',
'paho-mqtt',
'pexpect',
'pilight',
'pmsensor',
'prometheus_client',
'pydispatch',
'pydispatcher',
'PyJWT',
'pylitejet',
'pynx584',
'python-forecastio',
'pyunifi',
'pywebpush',
'restrictedpython',
@ -201,11 +201,13 @@ def requirements_test_output(reqs):
output = []
output.append('# Home Assistant test')
output.append('\n')
with open('requirements_test.txt') as fp:
output.append(fp.read())
with open('requirements_test.txt') as test_file:
output.append(test_file.read())
output.append('\n')
filtered = {key: value for key, value in reqs.items()
if any(ign in key for ign in TEST_REQUIREMENTS)}
if any(
re.search(r'(^|#){}($|[=><])'.format(ign),
key) is not None for ign in TEST_REQUIREMENTS)}
output.append(generate_requirements_list(filtered))
return ''.join(output)