Module talk:UnitTests: Difference between revisions

Content deleted Content added
reply
Line 3:
At the moment, the test groups appear on the page in random order. Is there any way of getting them to appear in the order that they are defined? — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 15:30, 3 April 2013 (UTC)
:As far as I know it's not possible to determine the order in which tests were defined, unless perhaps the test framework reads the module page (Lua source) itself. It's also not clear this is always the desired behaviour. There are a couple other approaches: always using alphabetical order, and naming your tests alphabetically in order using numbers; or giving you an option to explicitly specify the order. [[User:Dcoetzee|Dcoetzee]] 17:09, 3 April 2013 (UTC)
::Putting them in alphabetical order would be a good way around the problem. The test cases on [[Module talk:Delink/testcases]] don't appear in alphabetical order, though - it's just random, as far as I can tell. I think it's probably the natural table order that pairs() found, although I don't know the code well enough to try and change it. (And I might cause some disruption to other people's testing if I do.) — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 19:15, 3 April 2013 (UTC)
 
==Don't treat the result off a call as Wikitext==