test: Refactor TFW load_source() method to only take the file path
Fixes issues where example tests for persistent_sockets and advanced_tests both loaded a module named "client", causing a race condition.
This commit is contained in:
committed by
He Yin Ling
parent
c8f483034d
commit
da4cb76f5a
@@ -30,7 +30,7 @@ class Search(object):
|
||||
print("Try to get cases from: " + file_name)
|
||||
test_functions = []
|
||||
try:
|
||||
mod = load_source(str(hash(file_name)), file_name)
|
||||
mod = load_source(file_name)
|
||||
for func in [mod.__getattribute__(x) for x in dir(mod)
|
||||
if isinstance(mod.__getattribute__(x), types.FunctionType)]:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user