Skip to content

Commit

Permalink
tests and dependencies improved
Browse files Browse the repository at this point in the history
  • Loading branch information
grimmpp committed Mar 28, 2024
1 parent 2829d4b commit febaabc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
aiocoap
pyserial-asyncio
eltako14bus
enocean
eltako14bus==0.0.49
enocean==0.60.1
homeassistant
termcolor
StrEnum
esp2-gateway-adapter
esp2-gateway-adapter==0.1
13 changes: 11 additions & 2 deletions tests/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def get_version_of_required_eltako14bus(self):

def get_version_of_eltako_integration(self):
return self.get_manifest()['version']

def test_check_all_installed_dependencies(self):
manifest = self.get_manifest()

Expand All @@ -60,8 +60,17 @@ def test_check_all_installed_dependencies(self):
# if this test fails install specified libraries in manifest.json
self.assertEqual(required_version, installed_version)


def test_check_manifest_and_requirements_match(self):
manifest = self.get_manifest()

requirements_txt_fn = os.path.join(os.getcwd(), 'requirements.txt')
with open(requirements_txt_fn, 'r', encoding="utf-8") as f:
requirements_txt = f.read()

for r in manifest['requirements']:
self.assertTrue(r in requirements_txt)

return None

def test_eltako14bus_required_and_installed_is_the_same(self):
installed = self.get_version_of_installed_eltako14bus()
Expand Down

0 comments on commit febaabc

Please sign in to comment.