about summary refs log tree commit diff
path: root/setup_commands
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2026-05-21 13:47:44 -0500
committerFrederick Muriuki Muriithi2026-05-21 14:40:55 -0500
commit413abcbb2073773f96e5a8945c1477374d6dfae8 (patch)
tree53258974f727c0ee9ad97475abfbf07086d676af /setup_commands
parent4324f2432390392c8022beab480d8bc911682d1f (diff)
downloadgn-auth-413abcbb2073773f96e5a8945c1477374d6dfae8.tar.gz
Use pyproject.toml in place of setup.py and friends.
Diffstat (limited to 'setup_commands')
-rw-r--r--setup_commands/__init__.py3
-rw-r--r--setup_commands/run_tests.py40
2 files changed, 0 insertions, 43 deletions
diff --git a/setup_commands/__init__.py b/setup_commands/__init__.py
deleted file mode 100644
index 967bb11..0000000
--- a/setup_commands/__init__.py
+++ /dev/null
@@ -1,3 +0,0 @@
-"""Module for custom setup commands."""
-
-from .run_tests import RunTests
diff --git a/setup_commands/run_tests.py b/setup_commands/run_tests.py
deleted file mode 100644
index 1bb5dab..0000000
--- a/setup_commands/run_tests.py
+++ /dev/null
@@ -1,40 +0,0 @@
-import os
-import sys
-from distutils.core import Command
-
-class RunTests(Command):
-    """
-    A custom command to run tests.
-    """
-    description = "Run the tests"
-    test_types = (
-        "all", "unit", "integration", "performance")
-    user_options = [
-        ("type=", None,
-         f"""Specify the type of tests to run.
-         Valid types are {tuple(test_types)}.
-         Default is `all`.""")]
-
-    def __init__(self, dist):
-        """Initialise the command."""
-        super().__init__(dist)
-        self.command = "pytest"
-
-    def initialize_options(self):
-        """Initialise the default values of all the options."""
-        self.type = "all"
-
-    def finalize_options(self):
-        """Set final value of all the options once they are processed."""
-        if self.type not in RunTests.test_types:
-            raise Exception(f"""
-            Invalid test type (self.type) requested!
-            Valid types are
-            {tuple(RunTests.test_types)}""")
-
-        if self.type != "all":
-            self.command = f"pytest -m {self.type}_test"
-    def run(self):
-        """Run the chosen tests"""
-        print(f"Running {self.type} tests")
-        os.system(self.command)