diff options
| author | Cody Logan <clpo13@gmail.com> | 2020-09-02 15:49:23 -0700 |
|---|---|---|
| committer | Cody Logan <clpo13@gmail.com> | 2020-09-02 15:49:23 -0700 |
| commit | 560a652e4f27cfc4c17a7279c788c5820a1a112d (patch) | |
| tree | d9ac93d3344b066c61f658a59450c8c823dcd376 /test/test_validations.py | |
| parent | 75dfc31a15f02ff375895e9b695924a8d909c87a (diff) | |
| download | wikiget-560a652e4f27cfc4c17a7279c788c5820a1a112d.tar.gz wikiget-560a652e4f27cfc4c17a7279c788c5820a1a112d.zip | |
Simplify writing to tmp_file
Diffstat (limited to 'test/test_validations.py')
| -rw-r--r-- | test/test_validations.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/test/test_validations.py b/test/test_validations.py index 8322c7e..aecee50 100644 --- a/test/test_validations.py +++ b/test/test_validations.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # wikiget - CLI tool for downloading files from Wikimedia sites -# Copyright (C) 2018, 2019 Cody Logan +# Copyright (C) 2018, 2019, 2020 Cody Logan # SPDX-License-Identifier: GPL-3.0-or-later # # Wikiget is free software: you can redistribute it and/or modify @@ -86,8 +86,6 @@ def test_verify_hash(tmp_path): file_sha1 = '8843d7f92416211de9ebb963ff4ce28125932878' tmp_file = tmp_path / file_name - - with tmp_file.open('w') as f: - f.write(file_contents) + tmp_file.write_text(file_contents) assert verify_hash(tmp_file) == file_sha1 |
