-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test for importing and using dependencies
- add `requirements.txt` file for dependencies for tests - update ci to install these requirements
- Loading branch information
Showing
4 changed files
with
30 additions
and
0 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,24 @@ | ||
""" | ||
These tests test importing a dependency and using it in a test | ||
From issue #1 (https://github.com/brownben/xc/issues/1) | ||
- test_astroid: PASS | ||
- test_yarl: PASS | ||
""" | ||
|
||
import astroid | ||
from yarl import URL | ||
|
||
|
||
def test_astroid(): | ||
source_code = """ | ||
def foo(bar: str) -> int: | ||
return len(bar) | ||
""" | ||
tree = astroid.parse(source_code) | ||
assert tree | ||
|
||
|
||
def test_yarl(): | ||
foo = URL("http://foo.com/") | ||
assert foo / "bar" |
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,3 @@ | ||
# Requirements for ./execution/dependencies.txt | ||
astroid | ||
yarl |