Skip to content

Commit

Permalink
mkdocs too fragile test
Browse files Browse the repository at this point in the history
  • Loading branch information
whitej6 committed Sep 29, 2023
1 parent 9930fe4 commit 59f59e1
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions nautobot_device_lifecycle_mgmt/tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,3 @@ def test_version(self):
parent_path = os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
poetry_version = toml.load(os.path.join(parent_path, "pyproject.toml"))["tool"]["poetry"]["version"]
self.assertEqual(project_version, poetry_version)


class TestDocsPackaging(unittest.TestCase):
"""Test Version in doc requirements is the same pyproject."""

def test_version(self):
"""Verify that pyproject.toml dev dependecies have the same versions as in the docs requirements.txt."""
parent_path = os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
poetry_details = toml.load(os.path.join(parent_path, "pyproject.toml"))["tool"]["poetry"]["dev-dependencies"]
with open(f"{parent_path}/docs/requirements.txt", "r", encoding="utf-8") as file:
requirements = [line for line in file.read().splitlines() if (len(line) > 0 and not line.startswith("#"))]
for pkg in requirements:
if len(pkg.split("==")) == 2:
pkg, version = pkg.split("==")
else:
version = "*"
self.assertEqual(poetry_details[pkg], version)

0 comments on commit 59f59e1

Please sign in to comment.