-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
- Loading branch information
1 parent
e69b3b4
commit a4df1e1
Showing
6 changed files
with
57 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ | |
from dargs.cli import main | ||
|
||
if __name__ == "__main__": | ||
main() | ||
main() |
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 |
---|---|---|
|
@@ -217,4 +217,3 @@ def _test_argument() -> Argument: | |
), | ||
], | ||
) | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"test1": 1, | ||
"test2": 2 | ||
} | ||
} |
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 |
---|---|---|
@@ -1,12 +1,30 @@ | ||
from __future__ import annotations | ||
|
||
import subprocess | ||
import sys | ||
import unittest | ||
|
||
from pathlib import Path | ||
|
||
this_directory = Path(__file__).parent | ||
|
||
|
||
class TestCli(unittest.TestCase): | ||
def test_check(self): | ||
subprocess.check_call(["dargs", "check", "dargs._test.test_arguments", str(this_directory / "test_arguments.json")]) | ||
subprocess.check_call([sys.executable, "-m", "dargs", "check", "dargs._test.test_arguments", str(this_directory / "test_arguments.json")]) | ||
subprocess.check_call( | ||
[ | ||
"dargs", | ||
"check", | ||
"dargs._test.test_arguments", | ||
str(this_directory / "test_arguments.json"), | ||
] | ||
) | ||
subprocess.check_call( | ||
[ | ||
sys.executable, | ||
"-m", | ||
"dargs", | ||
"check", | ||
"dargs._test.test_arguments", | ||
str(this_directory / "test_arguments.json"), | ||
] | ||
) |