Hi,
Can you please guide me *how to* *clone pytest.Item?*
I want to take one *item* from *items* array (inside function
‘pytest_collection_modifyitems’) and clone that *item* and add it to *items*
array back.
Can someone please guide to do this?
Thanks,
Shiban.
__
Sounds like you want a deep copy?
https://docs.python.org/3.8/library/copy.html
Not sure if there's a Pytest way of doing this.
On Tue, Apr 14, 2020, 2:46 PM Anton Shiban wrote:
> Hi,
>
>
> Can you please guide me *how to* *clone pytest.Item?*
>
> I want to take one *item* from *items* array (
Thanks Imran.
I tried this copy.deepcopy() already and it fails with below error.
"TypeError: cannot deepcopy this pattern object"
Is there any other way to do this?
Thanks,
Shiban.
On Wed, Apr 15, 2020 at 3:26 AM Imran M wrote:
> Sounds like you want a deep copy?
>
> https://docs.python.or