speedup @ replacement for the massive lists from pytest-bdd :)
--HG-- branch : fix_initial_parsing
This commit is contained in:
parent
40eed363e8
commit
83e0b52294
|
@ -862,14 +862,11 @@ def getcfg(args, inibasenames):
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
||||||
|
rex_pyat = re.compile(r'(.*\.py)@\d+$')
|
||||||
|
|
||||||
def node_with_line_number(string):
|
def node_with_line_number(string):
|
||||||
newparts = []
|
return "::".join(rex_pyat.sub(lambda m: m.group(1), part)
|
||||||
for part in string.split("::"):
|
for part in string.split("::"))
|
||||||
m = re.match(r'.*\.py@\d+$', part)
|
|
||||||
if m is not None:
|
|
||||||
part = part[:part.rfind("@")]
|
|
||||||
newparts.append(part)
|
|
||||||
return "::".join(newparts)
|
|
||||||
|
|
||||||
|
|
||||||
def setns(obj, dic):
|
def setns(obj, dic):
|
||||||
|
|
Loading…
Reference in New Issue