-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnoxfile.py
More file actions
46 lines (43 loc) · 1.01 KB
/
noxfile.py
File metadata and controls
46 lines (43 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# -*- coding: utf-8 -*-
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
Noxfile
"""
import nox
@nox.session()
def clean(session):
session.install('coverage[toml]')
session.run('coverage', 'erase')
@nox.session(python=['3.8', '3.9', '3.10', '3.11'])
def tests(session):
session.install('.')
session.install('coverage[toml]')
session.install('pytest')
session.install('pytest-cov')
session.install('ruff')
session.run(
'pytest',
'--cov', 'lytemaps',
'--cov-append',
'tests/',
)
session.run('ruff', 'check', 'src/lytemaps')
@nox.session()
def report(session):
session.install('coverage[toml]')
session.run(
'coverage',
'report',
"--omit='*test*,*__init__*'",
)
session.run(
'coverage',
'html',
"--omit='*test*,*__init__*'",
)
session.run(
'coverage',
'xml',
"--omit='*test*,*__init__*'",
)