Skip to content

Commit 9a37737

Browse files
author
Akshay Laddha
committed
Wrap subprocess code string in regression test
1 parent ae9c5a0 commit 9a37737

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

tests/test_types.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,17 @@ def test_path_type(runner, cls, expect):
109109

110110

111111
def test_path_bytes_dash_no_byteswarning():
112+
code = (
113+
"from click.types import Path; "
114+
"Path(allow_dash=True).convert(b'-', None, None)"
115+
)
116+
112117
result = subprocess.run(
113118
[
114119
sys.executable,
115120
"-bb",
116121
"-c",
117-
"from click.types import Path; Path(allow_dash=True).convert(b'-', None, None)",
122+
code,
118123
],
119124
cwd=pathlib.Path(__file__).resolve().parents[1],
120125
env={**os.environ, "PYTHONPATH": "src"},

0 commit comments

Comments
 (0)