forked from Ryochan7/sc-controller
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
17 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |