Skip to content

Commit

Permalink
Update getgauge/impl_loader.py
Browse files Browse the repository at this point in the history
Correctly loading the methods from relatively imported classes (#365)

Signed-off-by: Kunal Vishwasrao <kunal.vishwasrao@gmail.com>

Co-authored-by: Zabil Cheriya Maliackal <zabil@users.noreply.github.com>
  • Loading branch information
kunalvishwasrao and zabil authored Jul 3, 2024
1 parent 25439a6 commit eeef098
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion getgauge/impl_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def _import_file(base_dir, file_path):

# Inject instace in each class method (hook/step)
def update_step_resgistry_with_class(instance, file_path):
# Resole the absolute path from relative path
# Resolve the absolute path from relative path
file_path = os.path.abspath(file_path) if '..' in file_path else file_path
for info in registry.get_all_methods_in(file_path):
class_methods = [x[0] for x in inspect.getmembers(instance, inspect.ismethod)]
Expand Down

0 comments on commit eeef098

Please sign in to comment.