Skip to content

Commit b1804a5

Browse files
committed
add a bit more template for exercises
1 parent 2856bff commit b1804a5

File tree

3 files changed

+29
-1
lines changed

3 files changed

+29
-1
lines changed

.github/workflows/examples.py

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Test
2+
on:
3+
- push
4+
jobs:
5+
test:
6+
runs-on: ubuntu-latest
7+
strategy:
8+
matrix:
9+
python-version: [3.7, 3.8, 3.9]
10+
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v2
14+
15+
- name: Set up Python ${{ matrix.python-version }}
16+
uses: actions/setup-python@v2
17+
with:
18+
python-version: ${{ matrix.python-version }}
19+
20+
- name: Install dependencies
21+
run: pip install -r requirements.txt
22+
23+
- name: Test
24+
run: python setup.py pytest --doctest-modules
File renamed without changes.

tests/test_exercise.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@
33

44
def test_sum1():
55
# basic sanity test: do we get the right answer for a simple case?
6-
assert True
6+
assert True #sciware_testing_python.sum_numbers([1,2,3]) == ?
77

88
def test_sum2():
99
# what's the sum of an empty list
1010
pass
11+
12+
#@pytest.mark.xfail(strict=True)
13+
def test_sum_strings():
14+
pass

0 commit comments

Comments
 (0)