-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: create smk_base() python function
based on CCBR/CHAMPAGNE#180
- Loading branch information
1 parent
e89af63
commit 27bf691
Showing
4 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
Binary file not shown.
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,8 @@ | ||
import os | ||
|
||
|
||
def smk_base(rel_path): | ||
basedir = os.path.split( | ||
os.path.split(os.path.dirname(os.path.realpath(__file__)))[0] | ||
)[0] | ||
return os.path.join(basedir, rel_path) |
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,12 @@ | ||
import os | ||
import sys | ||
|
||
SCRIPT_DIR = os.path.join( | ||
os.path.split(os.path.dirname(os.path.abspath(__file__)))[0], "src", "charlie" | ||
) | ||
sys.path.append(SCRIPT_DIR) | ||
from util import smk_base | ||
|
||
|
||
def test_smk_base(): | ||
assert smk_base("").endswith("charlie/") |