<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>*copey with the correct mail*</p>
<p>Hi Shiban,</p>
<p>its not safely possible to clone a item in general.<br>
</p>
<p>A) you need to make a new nodeid to prevent some issues</p>
<p>B) there is no safe cloning mechanism declared, different
subtypes of items have different mutable state you dont want to
mix</p>
<p>I believe the closest you can get is creating a new item that is
reasonably equivalent.<br>
The Details of that would depend on what the actual Item subtype
is.<br>
</p>
<p>-- Ronny<br>
</p>
<div class="moz-cite-prefix">Am 15.04.20 um 07:45 schrieb Ronny
Pfannschmidt:<br>
</div>
<blockquote type="cite"
cite="mid:810da89b-b379-525b-e05a-c93d07565f34@ronnypfannschmidt.de">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<p>Hi Shiban,</p>
<p>its not safely possible to clone a item in general.<br>
</p>
<p>A) you need to make a new nodeid to prevent some issues</p>
<p>B) there is no safe cloning mechanism declared, different
subtypes of items have different mutable state you dont want to
mix</p>
<p>I believe the closest you can get is creating a new item that
is reasonably equivalent.<br>
The Details of that would depend on what the actual Item subtype
is.<br>
</p>
<p>-- Ronny<br>
</p>
<div class="moz-cite-prefix">Am 14.04.20 um 23:46 schrieb Anton
Shiban:<br>
</div>
<blockquote type="cite"
cite="mid:CADcREHNMzLazEm65xnaNUksVZ7f4LbTcA2ha8Sj9juU=Lt0zPw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html;
charset=UTF-8">
<div dir="ltr">
<p class="MsoNormal" style="margin:0in 0in
0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">Hi,</p>
<p class="MsoNormal" style="margin:0in 0in
0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><br>
</p>
<p class="MsoNormal" style="margin:0in 0in
0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">Can
you please guide me <b>how to</b> <b>clone pytest.Item?</b></p>
<p class="MsoNormal" style="margin:0in 0in
0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">I
want to take one <b>item</b> from <b>items</b> array
(inside function ‘pytest_collection_modifyitems’) and clone
that <b>item</b> and add it to <b>items</b> array back.</p>
<p class="MsoNormal" style="margin:0in 0in
0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">Can
someone please guide to do this?</p>
<p class="MsoNormal" style="margin:0in 0in
0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><br>
</p>
<p class="MsoNormal" style="margin:0in 0in
0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">Thanks,</p>
<p class="MsoNormal" style="margin:0in 0in
0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">Shiban. </p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
pytest-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:pytest-dev@python.org" moz-do-not-send="true">pytest-dev@python.org</a>
<a class="moz-txt-link-freetext" href="https://mail.python.org/mailman/listinfo/pytest-dev" moz-do-not-send="true">https://mail.python.org/mailman/listinfo/pytest-dev</a>
</pre>
</blockquote>
</blockquote>
</body>
</html>