mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 15:37:35 +08:00
bugfix: private property should be _single_leading_underscore
This commit is contained in:
+4
-1
@@ -261,12 +261,15 @@ def is_variable(tup):
|
|||||||
"""
|
"""
|
||||||
name, item = tup
|
name, item = tup
|
||||||
if callable(item):
|
if callable(item):
|
||||||
|
# function or class
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if isinstance(item, types.ModuleType):
|
if isinstance(item, types.ModuleType):
|
||||||
|
# imported module
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if name.startswith("__"):
|
if name.startswith("_"):
|
||||||
|
# private property
|
||||||
return False
|
return False
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|||||||
Reference in New Issue
Block a user