FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
pre-commit/tests/languages/unsupported_script_test.py at v5-install · pre-commit/pre-commit · GitHub
pre-commit
pre-commit
Repository navigation
Code
Issues
17
(17)
Pull requests
8
(8)
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
pre-commit
/
tests
/
languages
/
unsupported_script_test.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
14 lines (10 loc) · 479 Bytes
Breadcrumbs
pre-commit
/
tests
/
languages
/
unsupported_script_test.py
Copy path
File metadata and controls
14 lines (10 loc) · 479 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from
__future__
import
annotations
from
pre_commit
.
languages
import
unsupported_script
from
pre_commit
.
util
import
make_executable
from
testing
.
language_helpers
import
run_language
def
test_unsupported_script_language
(
tmp_path
):
exe
=
tmp_path
.
joinpath
(
'main'
)
exe
.
write_text
(
'#!/usr/bin/env bash
\n
echo hello hello world
\n
'
)
make_executable
(
exe
)
expected
=
(
0
,
b'hello hello world
\n
'
)
assert
run_language
(
tmp_path
,
unsupported_script
,
'main'
)
==
expected
Back
|
FazBrowse Home
|
New Git URL