File tree 2 files changed +31
-3
lines changed
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"]
3
3
build-backend = " setuptools.build_meta"
4
4
5
5
[project ]
6
- name = " lazy_loader "
6
+ name = " lazy-loader "
7
7
requires-python = " >=3.9"
8
8
authors = [{name = " Scientific Python Developers" }]
9
9
readme = " README.md"
10
- license = { file = " LICENSE.md " }
10
+ license = " BSD-3-Clause "
11
11
dynamic = [' version' ]
12
12
classifiers = [
13
13
" Development Status :: 4 - Beta" ,
14
- " License :: OSI Approved :: BSD License" ,
15
14
" Programming Language :: Python :: 3" ,
16
15
" Programming Language :: Python :: 3.9" ,
17
16
" Programming Language :: Python :: 3.10" ,
@@ -102,3 +101,13 @@ source = [
102
101
" src/lazy_loader" ,
103
102
" */site-packages/lazy_loader" ,
104
103
]
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