Skip to content

Commit de5f74b

Browse files
committed
Make pytest path relative to current working directory
1 parent b4fc642 commit de5f74b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

shiny/_main_generate_test.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,13 @@ def generate_test_file(
146146
output_file=str(output_path),
147147
)
148148

149-
click.echo(f"✅ Test file generated successfully: {test_file_path}")
149+
relative_test_file_path = test_file_path.relative_to(Path.cwd())
150+
151+
click.echo(f"✅ Test file generated successfully: {relative_test_file_path}")
150152
click.echo()
151153
click.echo(cli_action(cli_bold("Next steps:")))
152154
click.echo(
153-
f"- Run {cli_code('pytest ' + str(test_file_path))} to run the generated test"
155+
f"- Run {cli_code('pytest ' + str(relative_test_file_path))} to run the generated test"
154156
)
155157
click.echo("- Review and customize the test as needed")
156158

0 commit comments

Comments
 (0)