Skip to content

Commit

Permalink
Try fixing test_setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
C0rn3j committed Sep 28, 2024
1 parent b3edd80 commit c76174e
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions tests/test_setup.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
import scc
import pkgutil

import toml

import scc


class TestSetup(object):
"""
Tests if SCC should be installable.
"""

"""Test if SCC should be installable."""

def test_packages(self):
"""
Tests if every known Action is documentated in docs/actions.md
"""
"""Test if every known Action is documented in docs/actions.md."""
try:
import gi
gi.require_version('Gtk', '3.0')
gi.require_version('GdkX11', '3.0')
gi.require_version('Rsvg', '2.0')
gi.require_version('Gtk', '3.0')
gi.require_version('GdkX11', '3.0')
gi.require_version('Rsvg', '2.0')
except ImportError:
pass

from setup import packages

# Load the packages from pyproject.toml
pyproject = toml.load("pyproject.toml")
packages = pyproject["tool"]["setuptools"]["packages"]

for importer, modname, ispkg in pkgutil.walk_packages(path=scc.__path__, prefix="scc.", onerror=lambda x: None):
if ispkg:
assert modname in packages, "Package '%s' is not being installed by setup.py" % (modname,)
assert modname in packages, f"Package '{modname}' is not being installed by setup.py"

0 comments on commit c76174e

Please sign in to comment.