test/first (#8)
Introducing first very simple tests for tools.py Reviewed-on: https://www.kuhl-mann.de/git/git/jkuhl/corrlib/pulls/8
This commit is contained in:
parent
acab85df82
commit
d70e8d32ce
9 changed files with 1650 additions and 11 deletions
|
|
@ -1,6 +1,6 @@
|
|||
from typing import Optional
|
||||
import typer
|
||||
from corrlib import __app_name__, __version__
|
||||
from corrlib import __app_name__
|
||||
from .initialization import create
|
||||
from .toml import import_tomls, update_project, reimport_project
|
||||
from .find import find_record, list_projects
|
||||
|
|
@ -8,6 +8,7 @@ from .tools import str2list
|
|||
from .main import update_aliases
|
||||
from .meas_io import drop_cache as mio_drop_cache
|
||||
import os
|
||||
from importlib.metadata import version, PackageNotFoundError
|
||||
|
||||
|
||||
app = typer.Typer()
|
||||
|
|
@ -15,7 +16,7 @@ app = typer.Typer()
|
|||
|
||||
def _version_callback(value: bool) -> None:
|
||||
if value:
|
||||
typer.echo(f"{__app_name__} v{__version__}")
|
||||
print(__app_name__, version(__app_name__))
|
||||
raise typer.Exit()
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue