-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #662 from linsword13/deployment
Support local rel path as deployment pull path
- Loading branch information
Showing
3 changed files
with
42 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Copyright 2022-2024 The Ramble Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
# https://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
# <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your | ||
# option. This file may not be copied, modified, or distributed | ||
# except according to those terms. | ||
"""Perform tests of the util/path functions""" | ||
|
||
import os | ||
|
||
import ramble.util.path | ||
|
||
import pytest | ||
|
||
|
||
@pytest.mark.parametrize( | ||
"path,expect", | ||
[ | ||
("rel/path", os.path.abspath("rel/path")), | ||
("/abs/path", "/abs/path"), | ||
("file:/abs/path", "file:/abs/path"), | ||
("gs://my-bucket", "gs://my-bucket"), | ||
], | ||
) | ||
def test_get_maybe_local_path(path, expect): | ||
assert ramble.util.path.get_maybe_local_path(path) == expect |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters