Adding upstream version 3.7.1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
a8737b0b29
commit
d24c1558a4
7 changed files with 28 additions and 9 deletions
|
@ -9,6 +9,7 @@ from pre_commit import parse_shebang
|
|||
from pre_commit.languages import rust
|
||||
from pre_commit.store import _make_local_repo
|
||||
from testing.language_helpers import run_language
|
||||
from testing.util import cwd
|
||||
|
||||
ACTUAL_GET_DEFAULT_VERSION = rust.get_default_version.__wrapped__
|
||||
|
||||
|
@ -29,6 +30,14 @@ def test_uses_default_when_rust_is_not_available(cmd_output_b_mck):
|
|||
assert ACTUAL_GET_DEFAULT_VERSION() == C.DEFAULT
|
||||
|
||||
|
||||
def test_selects_system_even_if_rust_toolchain_toml(tmp_path):
|
||||
toolchain_toml = '[toolchain]\nchannel = "wtf"\n'
|
||||
tmp_path.joinpath('rust-toolchain.toml').write_text(toolchain_toml)
|
||||
|
||||
with cwd(tmp_path):
|
||||
assert ACTUAL_GET_DEFAULT_VERSION() == 'system'
|
||||
|
||||
|
||||
def _make_hello_world(tmp_path):
|
||||
src_dir = tmp_path.joinpath('src')
|
||||
src_dir.mkdir()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue