Skip to content

Commit

Permalink
Use Windows path in test_run_operator if sys.platform is win32.
Browse files Browse the repository at this point in the history
  • Loading branch information
devdanzin committed Aug 27, 2023
1 parent 6725c6b commit c752e89
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/unit/test_build_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def checkout(self, revision, options):
class MockOperatorCls(BaseOperator):
name = "test"
data = {
"C:\\home\\test1.py " if sys.platform == "win32" else "/home/test1.py": None
"C:\\home\\test1.py" if sys.platform == "win32" else "/home/test1.py": None
}

def __init__(self, *args, **kwargs):
Expand Down Expand Up @@ -70,4 +70,5 @@ def test_build_simple(config):
def test_run_operator(config):
name, data = build.run_operator(MockOperator, "123", config, ["test1.py"])
assert name == "mock"
assert data == {os.path.relpath("/home/test1.py", config.path): None}
path = "C:\\home\\test1.py" if sys.platform == "win32" else "/home/test1.py"
assert data == {os.path.relpath(path, config.path): None}

0 comments on commit c752e89

Please sign in to comment.