Skip to content
Snippets Groups Projects
Commit 2a407d42 authored by David Schäfer's avatar David Schäfer
Browse files

not doing paths right at the beginning, will hurt in the long run

parent e145d7cc
No related branches found
No related tags found
8 merge requests!685Release 2.4,!684Release 2.4,!567Release 2.2.1,!566Release 2.2,!501Release 2.1,!372fix doctest snippets,!369Current documentation,!364Release preparation
Pipeline #53419 failed with stage
in 1 minute and 38 seconds
#!/usr/bin/env python
from click.testing import CliRunner
import os
from pathlib import Path
def test__main__py():
def test__main__py(tmp_path):
import saqc.__main__
# if not run from project root
projpath = os.path.dirname(saqc.__file__) + "/../"
projpath = Path(saqc.__file__).parents[1]
args = [
"--config",
projpath + "ressources/data/config.csv",
Path(projpath, "ressources/data/config.csv"),
"--data",
projpath + "ressources/data/data.csv",
Path(projpath, "ressources/data/data.csv"),
"--outfile",
"/tmp/test.csv", # the filesystem temp dir
Path(tmp_path, "test.csv"), # the filesystem temp dir
]
runner = CliRunner()
for scheme in ["float", "positional", "dmp", "simple"]:
result = runner.invoke(saqc.__main__.main, args + ["--scheme", scheme])
assert result.exit_code == 0, result.output
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment