def test_pretty_format_rust(undecorate_method, filename, expected_retval): filename = os.path.abspath(filename) x = os.path.dirname(os.path.dirname(filename)) print(x) with change_dir_context(x): assert undecorate_method([filename]) == expected_retval
def change_dir(): with change_dir_context("test-data/pretty_format_rust/"): yield