[wp-trac] [WordPress Trac] #53119: Tests: introduce naming conventions for data providers and use named test cases

WordPress Trac noreply at wordpress.org
Fri Apr 30 19:12:22 UTC 2021


#53119: Tests: introduce naming conventions for data providers and use named test
cases
------------------------------+------------------------------
 Reporter:  jrf               |       Owner:  (none)
     Type:  task (blessed)    |      Status:  new
 Priority:  normal            |   Milestone:  Awaiting Review
Component:  Build/Test Tools  |     Version:
 Severity:  normal            |  Resolution:
 Keywords:                    |     Focuses:  docs
------------------------------+------------------------------

Comment (by hellofromTonya):

 Replying to [comment:3 pbiron]:
 > If any given data provider could only be used for 1 test, then I would
 completely agree that having the provider immediately follow it's test.
 But since the proposal recognizes that a given provider ''could'' be used
 for more than one test then it's **not** guaranteed that a test's provider
 will **always** immediately follow it, so folks will still have to "jump
 around" some times, which adds a certain amount of "cognitive effort" in
 figuring out "is this one of those times?".

 In the case where a data provider is for multiple tests, the ticket
 proposes to group the test methods together with the data provider below
 the last test in the group. By doing so, the group of tests flow together
 with their data provider:

 test1
 test2
 test3
 dataProvider

 test4
 test5

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/53119#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list