Skip to content

Commit 7c05667

Browse files
committed
altered import location of show_cli_trace
1 parent 89f9b77 commit 7c05667

File tree

4 files changed

+5
-10
lines changed

4 files changed

+5
-10
lines changed

conftest.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def pytest_internalerror(excinfo):
5858
raise excinfo.value
5959

6060
def pytest_configure(config):
61-
config.option.capture = 'no' # allow print statements to show up in the console
61+
config.option.capture = "no" # allow print statements to show up in the console
6262
config.option.log_cli = True # show log messages in the console
6363
config.option.log_level = "INFO" # set the log level to INFO
6464

@@ -70,8 +70,3 @@ def pytest_configure(config):
7070
@pytest.fixture
7171
def catch_cli_exceptions():
7272
return CATCH_CLI_EXCEPTIONS
73-
74-
75-
def show_cli_trace(result):
76-
"Used in testing to show traceback of CLI output"
77-
return "".join(traceback.format_exception(*result.exc_info))

nipype2pydra/pkg_gen/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ def copy_ignore(_, names):
655655
fileformat_readme_path = related_pkgs_dir / "fileformats" / "README.rst"
656656
with open(fileformat_readme_path) as f:
657657
ff_readme_rst = f.read()
658-
ff_readme_rst = ff_readme_rst.replace("=" * 29, "=" * (27 + len(pkg)))
658+
ff_readme_rst = ff_readme_rst.replace("=" * 29, "=" * (21 + len(pkg)))
659659
with open(fileformat_readme_path, "w") as f:
660660
f.write(ff_readme_rst)
661661

@@ -664,7 +664,7 @@ def copy_ignore(_, names):
664664
)
665665
with open(fileformat_extras_readme_path) as f:
666666
ffe_readme_rst = f.read()
667-
ffe_readme_rst = ffe_readme_rst.replace("=" * 36, "=" * (34 + len(pkg)))
667+
ffe_readme_rst = ffe_readme_rst.replace("=" * 36, "=" * (28 + len(pkg)))
668668
with open(fileformat_extras_readme_path, "w") as f:
669669
f.write(ffe_readme_rst)
670670

nipype2pydra/task/tests/test_task.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import yaml
33
import pytest
44
import logging
5-
from conftest import show_cli_trace
5+
from nipype2pydra.utils import show_cli_trace
66
from traceback import format_exc
77
from nipype2pydra.cli.task import task as task_cli
88
from nipype2pydra.utils import add_to_sys_path, add_exc_note, INBUILT_NIPYPE_TRAIT_NAMES

nipype2pydra/tests/test_pkg_gen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from nipype2pydra.cli.pkg_gen import pkg_gen
2-
from conftest import show_cli_trace
2+
from nipype2pydra.utils import show_cli_trace
33

44

55
def test_pkg_gen(cli_runner, tmp_path):

0 commit comments

Comments
 (0)