<div dir="ltr">On 28 September 2015 at 12:47, Lucian Musat <span dir="ltr">&lt;<a href="mailto:george.l.musat@intel.com" target="_blank">george.l.musat@intel.com</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">@@ -172,6 +176,7 @@ def exportTests(d,tc):<br>+    from re import search as re_search<br></blockquote><div><br></div><div class="gmail_extra">Just import re and then do re.search - it&#39;s the same number of characters when calling and it&#39;s obvious what you&#39;re calling then.</div><div class="gmail_extra"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">     for t in tc.testslist:<br>
+        if re_search(&quot;\w+\.\w+\.test_\S+&quot;, t):<br>
+            t = t.split(&#39;.&#39;)[0]+&#39;.&#39;+t.split(&#39;.&#39;)[1]+&#39;.&#39;+t.split(&#39;.&#39;)[2]</blockquote><div><br></div><div>Not sure I understand what this is meant to be doing.  If t matches [alphanumerics].[alphanumerics].test_[not whitespace] repeatedly split t on dots and re-join it back together with dots.  For the example of filename.class.test_method doesn&#39;t this reconstruct the input?  If you&#39;re attempting to truncate to the first three elements, then something like &#39;.&#39;.join(t.split(&#39;.&#39;)[:3]) is much more efficient and Pythonic.</div><div><br></div><div>Ross</div></div></div></div>