Skip to content

Conversation

sschulz92
Copy link
Contributor

@sschulz92 sschulz92 commented Sep 3, 2025

This PR is related to #445 - apparently I want to overcome an issue using Gauge with VS Code: the C drive is written in capital C: but in VS Code some paths are written in lower case c: which causes the following stacktrace to happen:

Failed Step: Start polling <step_var>
Specification: <PATH_TO_SPEC_FILE>.spec:31
Error Message: PollingSteps.start_polling() missing 1 required positional argument: 'step_var'
Stacktrace: 
Traceback (most recent call last):
   File "<PYTHON_PATH>\site-packages\getgauge\executor.py", line 35, in execute_method
      step.impl(*params)
     ~~~~~~~~~^^^^^^^^^
TypeError: PollingSteps.start_polling() missing 1 required positional argument: 'step_var'

I copied the unit tests to a new branch based on master and executed them with following error:

FAIL: test_Registry_get_all_methods_in_should_handle_paths_case_sensitive (__main__.RegistryTests.test_Registry_get_all_methods_in_should_handle_paths_case_sensitive)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "<GAUGE_PYTHON_REPO>\tests\test_registry.py", line 378, in test_Registry_get_all_methods_in_should_handle_paths_case_sensitive
    self.assertEqual(2, len(registry.get_all_methods_in(lower_c_drive)))
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 2 != 1

After I cherry-picked the changes in registry.py, the test passed on Windows (and will properly also pass on Linux using GitHub actions). I verified that the actual Gauge test scenarios (from the stacktrace above) passed too installing the SNAPSHOT version locally.

Once this PR is merged, I can tackle the actual refactoring more precisely in the other Pull-Request to avoid mixed changes.

@chadlwilson maybe it is worth to release this separately also? So that this version is the bug-fix and the next might be the refactoring to load steps?

@sschulz92 sschulz92 marked this pull request as draft September 3, 2025 09:16
@sschulz92 sschulz92 marked this pull request as ready for review September 3, 2025 12:25
@sschulz92
Copy link
Contributor Author

@chadlwilson Any chance to get this one done including releasing it? 😄

@chadlwilson
Copy link
Contributor

There's always a chance 😅

This is an alternate (but preferred from your perspective) approach to your other PR?

@sschulz92
Copy link
Contributor Author

There's always a chance 😅

This is an alternate (but preferred from your perspective) approach to your other PR?

I wanted to keep the PR as small as possible and basically this is it. By using hte paths_equal() approach, the issue I can see in VS Code is resolved. This was the overall issue I wanted to resolve.

After this is done I would like to finish the other PR which is more a refactoring than a bugfix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants