Make tox tests run
This commit is contained in:
parent
419fa73865
commit
bf972ae6cb
3 changed files with 14 additions and 2 deletions
3
pytest.ini
Normal file
3
pytest.ini
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
[pytest]
|
||||
testpaths = gerbolyze/tests
|
||||
norecursedirs=*
|
||||
7
setup.py
7
setup.py
|
|
@ -10,8 +10,11 @@ from pathlib import Path
|
|||
import re
|
||||
|
||||
def get_tag():
|
||||
res = subprocess.run(['git', 'describe', '--tags', '--match', 'v*'], capture_output=True, check=True, text=True)
|
||||
return res.stdout.strip()
|
||||
try:
|
||||
res = subprocess.run(['git', '--git-dir', str(Path(__file__).with_name('.git')), 'describe', '--tags', '--match', 'v*'], capture_output=True, check=True, text=True)
|
||||
return res.stdout.strip()
|
||||
except subprocess.CalledProcessError as e:
|
||||
return 'v0.0.0-dev'
|
||||
|
||||
def get_version():
|
||||
version, _, _rest = get_tag()[1:].partition('-')
|
||||
|
|
|
|||
6
tox.ini
Normal file
6
tox.ini
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
[tox]
|
||||
envlist = py38, py312
|
||||
|
||||
[testenv]
|
||||
deps = pytest
|
||||
commands = pytest
|
||||
Loading…
Add table
Add a link
Reference in a new issue