Skip to content

Commit 1b15952

Browse files
nipunn1313uranusjr
authored andcommitted
Run black on tests/functional/test_hash.py
1 parent 7495e78 commit 1b15952

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

tests/functional/test_hash.py

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,35 @@
33

44
def test_basic_hash(script, tmpdir):
55
"""Run 'pip hash' through its default behavior."""
6-
expected = ('--hash=sha256:2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425'
7-
'e73043362938b9824')
8-
result = script.pip('hash', _hello_file(tmpdir))
6+
expected = (
7+
"--hash=sha256:2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425"
8+
"e73043362938b9824"
9+
)
10+
result = script.pip("hash", _hello_file(tmpdir))
911
assert expected in str(result)
1012

1113

1214
def test_good_algo_option(script, tmpdir):
1315
"""Make sure the -a option works."""
14-
expected = ('--hash=sha512:9b71d224bd62f3785d96d46ad3ea3d73319bfbc2890caad'
15-
'ae2dff72519673ca72323c3d99ba5c11d7c7acc6e14b8c5da0c4663475c2e'
16-
'5c3adef46f73bcdec043')
17-
result = script.pip('hash', '-a', 'sha512', _hello_file(tmpdir))
16+
expected = (
17+
"--hash=sha512:9b71d224bd62f3785d96d46ad3ea3d73319bfbc2890caad"
18+
"ae2dff72519673ca72323c3d99ba5c11d7c7acc6e14b8c5da0c4663475c2e"
19+
"5c3adef46f73bcdec043"
20+
)
21+
result = script.pip("hash", "-a", "sha512", _hello_file(tmpdir))
1822
assert expected in str(result)
1923

2024

2125
def test_bad_algo_option(script, tmpdir):
2226
"""Make sure the -a option raises an error when given a bad operand."""
23-
result = script.pip('hash', '-a', 'invalidname', _hello_file(tmpdir),
24-
expect_error=True)
27+
result = script.pip(
28+
"hash", "-a", "invalidname", _hello_file(tmpdir), expect_error=True
29+
)
2530
assert "invalid choice: 'invalidname'" in str(result)
2631

2732

2833
def _hello_file(tmpdir):
2934
"""Return a temp file to hash containing "hello"."""
30-
file = tmpdir / 'hashable'
31-
file.write_text('hello')
35+
file = tmpdir / "hashable"
36+
file.write_text("hello")
3237
return file

0 commit comments

Comments
 (0)