[pyupgrade] tests/ (#10347)

This commit is contained in:
Jonathan de Jong 2021-07-13 12:43:15 +02:00 committed by GitHub
parent 879d8c1ee1
commit 89cfc3dd98
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 45 additions and 58 deletions

View file

@ -43,7 +43,7 @@ class ConfigLoadingTestCase(unittest.TestCase):
def test_generates_and_loads_macaroon_secret_key(self):
self.generate_config()
with open(self.file, "r") as f:
with open(self.file) as f:
raw = yaml.safe_load(f)
self.assertIn("macaroon_secret_key", raw)
@ -120,7 +120,7 @@ class ConfigLoadingTestCase(unittest.TestCase):
def generate_config_and_remove_lines_containing(self, needle):
self.generate_config()
with open(self.file, "r") as f:
with open(self.file) as f:
contents = f.readlines()
contents = [line for line in contents if needle not in line]
with open(self.file, "w") as f: