From 56cd3bc77d6f39f1e92866eb6ec6a33e89104515 Mon Sep 17 00:00:00 2001 From: Maxim Kurnikov Date: Thu, 7 Feb 2019 01:27:29 +0300 Subject: [PATCH] fix ci --- scripts/typecheck_tests.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/typecheck_tests.py b/scripts/typecheck_tests.py index 7c10ddb..e3e4835 100644 --- a/scripts/typecheck_tests.py +++ b/scripts/typecheck_tests.py @@ -530,8 +530,11 @@ def replace_with_clickable_location(error: str, abs_test_folder: Path) -> str: raw_path, _, error_line = error.partition(': ') fname, _,line_number = raw_path.partition(':') - print(f'project directory is {PROJECT_DIRECTORY}') - path = abs_test_folder.joinpath(fname).relative_to(PROJECT_DIRECTORY) + try: + path = abs_test_folder.joinpath(fname).relative_to(PROJECT_DIRECTORY) + except ValueError: + # fail on travis, just show an error + return error clickable_location = f'./{path}:{line_number or 1}' return error.replace(raw_path, clickable_location)