We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dd567b3 commit 1e46bbaCopy full SHA for 1e46bba
1 file changed
setup.py
@@ -46,6 +46,27 @@
46
about["__version__"] = VERSION
47
48
49
+class TestCommand(Command):
50
+ """Support setup.py test."""
51
+
52
+ description = "Test the package."
53
+ user_options = []
54
55
+ @staticmethod
56
+ def status(s):
57
+ """Prints things in bold."""
58
+ print("\033[1m{0}\033[0m".format(s))
59
60
+ def initialize_options(self):
61
+ pass
62
63
+ def finalize_options(self):
64
65
66
+ def run(self):
67
+ os.system("{0} -m pytest".format(sys.executable))
68
+ sys.exit()
69
70
class UploadCommand(Command):
71
"""Support setup.py upload."""
72
@@ -129,5 +150,6 @@ def run(self):
129
150
# $ setup.py publish support.
130
151
cmdclass={
131
152
"upload": UploadCommand,
153
+ "test": TestCommand
132
154
},
133
155
)
0 commit comments