diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-01-19 12:09:27 -0600 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-01-19 12:09:27 -0600 |
commit | aed9e17b6080d540ba5b5aab5e3096581a4bbd13 (patch) | |
tree | f82b79122e6840d48417edf37efd26df51077588 /tests/utils.py | |
parent | 2502ce599b39509ba9c05b6e553527e5ed5ac43c (diff) | |
download | cryptography-aed9e17b6080d540ba5b5aab5e3096581a4bbd13.tar.gz cryptography-aed9e17b6080d540ba5b5aab5e3096581a4bbd13.tar.bz2 cryptography-aed9e17b6080d540ba5b5aab5e3096581a4bbd13.zip |
revert fixture decorator for now, switch to append. no more globals
Diffstat (limited to 'tests/utils.py')
-rw-r--r-- | tests/utils.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/utils.py b/tests/utils.py index ee1675e8..a2432256 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -22,13 +22,13 @@ def select_backends(names, backend_list): split_names = [x.strip() for x in names.split(',')] # this must be duplicated and then removed to preserve the metadata # pytest associates. Appending backends to a new list doesn't seem to work - backends = list(backend_list) - for backend in backends: - if backend.name not in split_names: - backend_list.remove(backend) + selected_backends = [] + for backend in backend_list: + if backend.name in split_names: + selected_backends.append(backend) - if len(backend_list) > 0: - return backend_list + if len(selected_backends) > 0: + return selected_backends else: raise ValueError( "No backend selected. Tried to select: {0}".format(split_names) |