diff options
author | Will Ayd <william.ayd@icloud.com> | 2017-12-01 11:00:45 -0500 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2018-01-08 20:57:33 -0500 |
commit | 09530e61a0035192ca8bcdebc5ead13d14c16eb0 (patch) | |
tree | cd9b31edf7f69adf3e64ae0e54e31a37e92914a5 /django/test/utils.py | |
parent | acd3baf2ae3f74846731447df66e8c3ce7a772f7 (diff) | |
download | django-09530e61a0035192ca8bcdebc5ead13d14c16eb0.tar.gz |
Fixed #28869 -- Made tagged test classes and methods inherit tags from parents.
Diffstat (limited to 'django/test/utils.py')
-rw-r--r-- | django/test/utils.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/django/test/utils.py b/django/test/utils.py index 1a1b78f34d..cbefaf0e09 100644 --- a/django/test/utils.py +++ b/django/test/utils.py @@ -831,6 +831,9 @@ class isolate_apps(TestContextDecorator): def tag(*tags): """Decorator to add tags to a test class or method.""" def decorator(obj): - setattr(obj, 'tags', set(tags)) + if hasattr(obj, 'tags'): + obj.tags = obj.tags.union(tags) + else: + setattr(obj, 'tags', set(tags)) return obj return decorator |