jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/474523 )

Change subject: [bugfix] Use a copy of failed_dep_script_set for 
_expected_failures
......................................................................

[bugfix] Use a copy of failed_dep_script_set for _expected_failures

failed_dep_script_set is a mutable. Assigning it to _expected_failures and
modifying _expected_failures also modifies failed_dep_script_set's content
because _expected_failures is just a reference and using
failed_dep_script_set with the next class it unexpectly uses the modified
content and tests may fail.

Therefore use a copy.

Bug: T209762
Change-Id: I2df96be60b9aaaf462f843a6fd6b2d9e0b33368e
---
M tests/script_tests.py
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Dalba: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/script_tests.py b/tests/script_tests.py
index 1bca38e..9018535 100644
--- a/tests/script_tests.py
+++ b/tests/script_tests.py
@@ -374,7 +374,7 @@

     net = False

-    _expected_failures = failed_dep_script_set
+    _expected_failures = set(failed_dep_script_set)  # use a copy
     # -help tests may pass even when packages are required
     _expected_failures.discard('flickrripper')
     _expected_failures.discard('imageharvest')

--
To view, visit https://gerrit.wikimedia.org/r/474523
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I2df96be60b9aaaf462f843a6fd6b2d9e0b33368e
Gerrit-Change-Number: 474523
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Dalba <[email protected]>
Gerrit-Reviewer: Dvorapa <[email protected]>
Gerrit-Reviewer: John Vandenberg <[email protected]>
Gerrit-Reviewer: jenkins-bot (75)
_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits

Reply via email to