Skip to content

Commit

Permalink
Make it compatible with windows
Browse files Browse the repository at this point in the history
  • Loading branch information
amritghimire committed Oct 17, 2024
1 parent ba60976 commit cf9a7bc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/unit/test_config.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import os

import pytest
from tomlkit import TOMLDocument, dump

Expand Down Expand Up @@ -49,14 +51,15 @@ def create_local_config(current_dir):
"local-conf": "exists",
}

with open(DataChainDir(current_dir + "/.datachain").config, "w") as f:
with open(DataChainDir(os.path.join(current_dir, ".datachain")).config, "w") as f:
dump(conf, f)


def test_get_dir(global_config_dir, system_config_dir, current_dir):
assert Config.get_dir(ConfigLevel.GLOBAL) == global_config_dir
assert Config.get_dir(ConfigLevel.SYSTEM) == system_config_dir
assert Config.get_dir(ConfigLevel.LOCAL) == current_dir + "/.datachain"

assert Config.get_dir(ConfigLevel.LOCAL) == os.path.join(current_dir, ".datachain")


def test_read_config(global_config_dir, system_config_dir, current_dir):
Expand Down

0 comments on commit cf9a7bc

Please sign in to comment.