Skip to content

Commit

Permalink
Use os.path.normcase to match Windows drive letters
Browse files Browse the repository at this point in the history
The normcase function lowercases Windows drive letters.
  • Loading branch information
mdpiper committed Jan 13, 2020
1 parent 32f5133 commit 0784931
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pymt/framework/bmi_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def find_model_metadata(plugin):
else:
path_to_mmd = model_metadata_dir

return os.path.abspath(path_to_mmd)
return os.path.normcase(os.path.abspath(path_to_mmd))


class PluginMetadata(ModelMetadata):
Expand Down
2 changes: 1 addition & 1 deletion tests/framework/test_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def test_author_multiple_authors(key, iter):

@pytest.mark.parametrize("path_to_meta", ("", ".", "meta", "/usr/local/share"))
def test_find_metadata(path_to_meta):
expected = os.path.abspath(os.path.join(os.path.dirname(__file__), path_to_meta))
expected = os.path.normcase(os.path.abspath(os.path.join(os.path.dirname(__file__), path_to_meta)))
if expected.endswith(os.path.sep):
expected = expected[:-1]

Expand Down

0 comments on commit 0784931

Please sign in to comment.