[wp-trac] [WordPress Trac] #53363: Test tool and unit test improvements for 5.9

WordPress Trac noreply at wordpress.org
Wed Jul 21 17:20:47 UTC 2021


#53363: Test tool and unit test improvements for 5.9
------------------------------+---------------------
 Reporter:  desrosj           |       Owner:  (none)
     Type:  task (blessed)    |      Status:  new
 Priority:  normal            |   Milestone:  5.9
Component:  Build/Test Tools  |     Version:
 Severity:  normal            |  Resolution:
 Keywords:                    |     Focuses:
------------------------------+---------------------

Comment (by jrf):

 Putting a hold on patch `53363-01.patch` /cc @johnbillion

 There is something weird going on with this.
 * If the tests are run with `WP_RUN_CORE_TESTS` set to `0`, those tests
 are marked as "risky" due to not performing any assertions. The patch
 would fix that.
 * However, if the tests are run with `WP_RUN_CORE_TESTS` set to `1` + this
 patch applied, those same tests are marked as "risky" saying that 4
 assertions were run - even though the tests are empty.

 This leads me to believe that somewhere assertions are being used within a
 fixture method (`setUp()` et al). This is bad practice and should not be
 allowed.

 I've not dug in any deeper yet, but I do believe that this underlying
 issue needs to be solved first before this patch can be accepted.

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


More information about the wp-trac mailing list