-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Remove duplicate @with_seed decorators #19336
Conversation
Hey @leezu , Thanks for submitting the PR
CI supported jobs: [sanity, miscellaneous, windows-gpu, windows-cpu, unix-cpu, centos-gpu, centos-cpu, edge, website, unix-gpu, clang] Note: |
function_scope_seed pytest autuse fixture defined in conftest.py already manages the seeds of every test function.
5b2a883
to
f0ca4e0
Compare
It will be nice to have the functionality of @with_seed without relying on the test creator to add the decorator. I'll take a look at this... |
@DickJC123 that's the aim of this PR. We already have the function seed functionality in |
@DickJC123 please take a look at the fixture implementation: I wrote it earlier based on |
@mxnet-bot run ci [windows-gpu] |
Jenkins CI successfully triggered : [windows-gpu] |
@mxnet-bot run ci [unix-cpu] |
Jenkins CI successfully triggered : [unix-cpu] |
function_scope_seed pytest autuse fixture defined in conftest.py already manages the seeds of every test function.
Relying on the autouse fixture is more robust, as it does not require the contributors to add a explicit
@with_seed
decorator to contributed test functions.Please see below code-blocks for examples how the test seed is printed. The first codeblock shows a normal test function, whereas the second shows a
unittest.TestCase
.