Skip to content

Commit cde7993

Browse files
authored
4645 Add github action for polyapi-python unittests, fix polyapi-python unittests (#57)
* make tests pass and github actions * comment + push * add dev_requirements * use dev requirements * using mkdir to avoid poly not existing * Revert deployables anf change whitespace for passing tests * undo diff * undo deployables.py change
1 parent 0052b8e commit cde7993

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

.github/workflows/python-ci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
- name: Create dummy poly directory for tests
2+
run: mkdir -p polyapi/poly
3+
4+
- name: Install dependencies
5+
run: |
6+
python -m pip install --upgrade pip
7+
pip install -r dev_requirements.txt
8+
9+
- name: Run tests
10+
run: pytest tests/

dev_requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
-r requirements.txt
2+
mock==5.2.0
3+
pytest

tests/test_deployables.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ def foobar(foo: str, bar: Dict[str, str]) -> int:
6666
"""A function that does something really import.
6767
6868
Args:
69-
foo (str):
70-
bar (Dict[str, str]):
69+
foo (str):
70+
bar (Dict[str, str]):
7171
7272
Returns:
73-
int:
73+
int:
7474
"""
7575
print("Okay then!")
7676
return 7

0 commit comments

Comments
 (0)