File tree Expand file tree Collapse file tree 2 files changed +31
-3
lines changed Expand file tree Collapse file tree 2 files changed +31
-3
lines changed Original file line number Diff line number Diff line change 1+ import sys
2+
3+ import click
4+ from spin .cmds .util import run
5+
6+
7+ @click .command ()
8+ @click .argument ("pytest_args" , nargs = - 1 )
9+ @click .option (
10+ "-c" ,
11+ "--coverage" ,
12+ is_flag = True ,
13+ help = "Generate a coverage report of executed tests." ,
14+ )
15+ def test (pytest_args , coverage = False ):
16+ """🔧 Run tests"""
17+ if coverage :
18+ pytest_args = ("--cov=lazy_loader" , * pytest_args )
19+ run ([sys .executable , "-m" , "pytest" , * list (pytest_args )])
Original file line number Diff line number Diff line change @@ -3,15 +3,14 @@ requires = ["setuptools>=61.2"]
33build-backend = " setuptools.build_meta"
44
55[project ]
6- name = " lazy_loader "
6+ name = " lazy-loader "
77requires-python = " >=3.9"
88authors = [{name = " Scientific Python Developers" }]
99readme = " README.md"
10- license = { file = " LICENSE.md " }
10+ license = " BSD-3-Clause "
1111dynamic = [' version' ]
1212classifiers = [
1313 " Development Status :: 5 - Production/Stable" ,
14- " License :: OSI Approved :: BSD License" ,
1514 " Programming Language :: Python :: 3" ,
1615 " Programming Language :: Python :: 3.9" ,
1716 " Programming Language :: Python :: 3.10" ,
@@ -102,3 +101,13 @@ source = [
102101 " src/lazy_loader" ,
103102 " */site-packages/lazy_loader" ,
104103]
104+
105+ [tool .spin ]
106+ package = ' lazy_loader'
107+
108+ [tool .spin .commands ]
109+ Build = [
110+ ' spin.cmds.pip.install' ,
111+ ' .spin/cmds.py:test' ,
112+ ' spin.cmds.build.sdist' ,
113+ ]
You can’t perform that action at this time.
0 commit comments