-
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove too strict check for root manifest reload
Since we are using absolute paths all around, that check is no longer necessary. Add a test for this situation, which should work besides the warning.
- Loading branch information
1 parent
1fdee79
commit de34cdd
Showing
4 changed files
with
42 additions
and
3 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
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,32 @@ | ||
""" | ||
Verify that requesting a pin from a dir which is not the root still works, but | ||
the user gets a warning about it. | ||
""" | ||
|
||
import os, re | ||
|
||
from drivers.alr import run_alr, init_local_crate | ||
from drivers.asserts import assert_eq, assert_match | ||
from drivers.helpers import dir_separator | ||
|
||
# Create top crate | ||
init_local_crate() | ||
|
||
# Create nested crate | ||
init_local_crate("child") | ||
|
||
# Enter a subdir of the nested crate | ||
os.mkdir("sub") | ||
os.chdir("sub") | ||
|
||
s = re.escape(dir_separator()) | ||
|
||
# Add the pin for the parent crate from the subdir of the child | ||
p = run_alr("with", "xxx", f"--use=..{s}..", quiet=False) | ||
|
||
# Check the warning | ||
assert_match(f".*Adding pin to .*pin__from-subdir{s}xxx in crate child rooted" | ||
f" at .*{s}pin__from-subdir{s}xxx{s}child", | ||
p.out) | ||
|
||
print('SUCCESS') |
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 @@ | ||
driver: python-script |