Closed spooning closed 10 years ago
Originally submitted to Google Code by @pekkaklarck on 19 Nov 2008
This is the weirdest bug ever. Juha, will you take a look at this yourself?
How important it actually is that we allow these settings in init files in the first place? Should we remove them in 2.1?
Originally submitted to Google Code by @pekkaklarck on 19 Nov 2008
The problem is caused by test suite parent data passed to test cases in a list without copying it. Tests then say data.reverse later and thus alter the original list. Simple fix is below, but there's room for some more refactoring related to this.
# Index: src/robot/running/model.py
--- src/robot/running/model.py (<a href="https://code.google.com/p/robotframework/source/detail?r=995">revision 995</a>)
+++ src/robot/running/model.py (working copy)
@⁠@⁠ -48,7 +48,7 @⁠@⁠
self.teardown = utils.get_not_none(suitedata.suite_teardown, [])
self.suites = [ RunnableTestSuite(suite, parentdatas)
for suite in suitedata.suites ]
- self.tests = [ RunnableTestCase(test, parentdatas)
- self.tests = [ RunnableTestCase(test, parentdatas[:])
for test in suitedata.tests ]
if self.name == '': # suitedata was multisource suite
self.name = ' & '.join([suite.name for suite in self.suites])
Originally submitted to Google Code by @jrantanen on 19 Nov 2008
See r996 for fix and r997 for test changes.
Review needed.
Originally submitted to Google Code by @jrantanen on 19 Nov 2008
Made still some refactoring based on the review. See r1003 for final version.
Originally submitted to Google Code by @jrantanen on 16 Mar 2011
This issue was closed by revision 2ac61cc82dfe.
Originally submitted to Google Code by @pekkaklarck on 16 Mar 2011
Issue state was accidentally modified by commit messages during Mercurial transition.
When above settings are defined in the init file and again in suite file, every second test gets the value from init file even it should always get the value from suite file.