diff options
Diffstat (limited to 'binary_search_tool/test/common.py')
-rwxr-xr-x | binary_search_tool/test/common.py | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/binary_search_tool/test/common.py b/binary_search_tool/test/common.py index cf5300f5..6632a4c7 100755 --- a/binary_search_tool/test/common.py +++ b/binary_search_tool/test/common.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -# Copyright 2020 The Chromium OS Authors. All rights reserved. +# Copyright 2020 The ChromiumOS Authors # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. @@ -8,35 +8,35 @@ DEFAULT_OBJECT_NUMBER = 1238 DEFAULT_BAD_OBJECT_NUMBER = 23 -OBJECTS_FILE = 'objects.txt' -WORKING_SET_FILE = 'working_set.txt' +OBJECTS_FILE = "objects.txt" +WORKING_SET_FILE = "working_set.txt" def ReadWorkingSet(): - working_set = [] - with open(WORKING_SET_FILE, 'r', encoding='utf-8') as f: - for l in f: - working_set.append(int(l)) - return working_set + working_set = [] + with open(WORKING_SET_FILE, "r", encoding="utf-8") as f: + for l in f: + working_set.append(int(l)) + return working_set def WriteWorkingSet(working_set): - with open(WORKING_SET_FILE, 'w', encoding='utf-8') as f: - for o in working_set: - f.write('{0}\n'.format(o)) + with open(WORKING_SET_FILE, "w", encoding="utf-8") as f: + for o in working_set: + f.write("{0}\n".format(o)) def ReadObjectsFile(): - objects_file = [] - with open(OBJECTS_FILE, 'r', encoding='utf-8') as f: - for l in f: - objects_file.append(int(l)) - return objects_file + objects_file = [] + with open(OBJECTS_FILE, "r", encoding="utf-8") as f: + for l in f: + objects_file.append(int(l)) + return objects_file def ReadObjectIndex(filename): - object_index = [] - with open(filename, 'r', encoding='utf-8') as f: - for o in f: - object_index.append(int(o)) - return object_index + object_index = [] + with open(filename, "r", encoding="utf-8") as f: + for o in f: + object_index.append(int(o)) + return object_index |