On 28 September 2015 at 12:47, Lucian Musat <george.l.mu...@intel.com> wrote:
> @@ -172,6 +176,7 @@ def exportTests(d,tc): > + from re import search as re_search > Just import re and then do re.search - it's the same number of characters when calling and it's obvious what you're calling then. for t in tc.testslist: > + if re_search("\w+\.\w+\.test_\S+", t): > + t = t.split('.')[0]+'.'+t.split('.')[1]+'.'+t.split('.')[2] 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't this reconstruct the input? If you're attempting to truncate to the first three elements, then something like '.'.join(t.split('.')[:3]) is much more efficient and Pythonic. Ross
-- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core