Some manual .format() -> f-strings

This commit is contained in:
Anthony Sottile 2020-01-12 11:13:39 -08:00
parent aefbe71765
commit 9000e9dd41
27 changed files with 133 additions and 173 deletions

View file

@ -52,11 +52,11 @@ def test_shebang_posix_not_on_path():
def test_shebang_posix_on_path(tmpdir):
tmpdir.join('python{}'.format(sys.version_info[0])).ensure()
tmpdir.join(f'python{sys.version_info[0]}').ensure()
with mock.patch.object(sys, 'platform', 'posix'):
with mock.patch.object(os, 'defpath', tmpdir.strpath):
expected = '#!/usr/bin/env python{}'.format(sys.version_info[0])
expected = f'#!/usr/bin/env python{sys.version_info[0]}'
assert shebang() == expected