File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -87,8 +87,7 @@ def validate_dir(path):
8787 return path
8888 if path .startswith ("~" ):
8989 path = fs .expanduser (path )
90- return path
91- # return os.path.abspath(path)
90+ return os .path .abspath (path )
9291
9392
9493def get_default_core_dir ():
Original file line number Diff line number Diff line change @@ -354,7 +354,10 @@ def test_get_value(config):
354354 "--help" ,
355355 ]
356356 # test relative dir
357- assert config .get ("platformio" , "src_dir" ) == "source"
357+ assert config .get ("platformio" , "src_dir" ) == os .path .abspath (
358+ os .path .join (os .getcwd (), "source" )
359+ )
360+
358361 # renamed option
359362 assert config .get ("env:extra_1" , "lib_install" ) == ["574" ]
360363 assert config .get ("env:extra_1" , "lib_deps" ) == ["574" ]
@@ -651,7 +654,7 @@ def test_nested_interpolation(tmp_path: Path):
651654 """
652655[platformio]
653656build_dir = /tmp/pio-$PROJECT_HASH
654- data_dir = $PROJECT_DIR/assets
657+ data_dir = / $PROJECT_DIR/assets
655658
656659[env:myenv]
657660build_flags = -D UTIME=${UNIX_TIME}
@@ -665,7 +668,7 @@ def test_nested_interpolation(tmp_path: Path):
665668 """
666669 )
667670 config = ProjectConfig (str (project_conf ))
668- assert config .get ("platformio" , "data_dir" ) == "$PROJECT_DIR/assets"
671+ assert config .get ("platformio" , "data_dir" ) == "/ $PROJECT_DIR/assets"
669672 assert config .get ("env:myenv" , "build_flags" )[0 ][- 10 :].isdigit ()
670673 testing_command = config .get ("env:myenv" , "test_testing_command" )
671674 assert "$" not in " " .join (testing_command )
You can’t perform that action at this time.
0 commit comments