Skip to content

Commit f9e8271

Browse files
authored
Merge pull request #178 from takluyver/tests-fix-ci-update
Fix tests 🤞 & switch CI from Travis to Github actions
2 parents 1397af8 + a931432 commit f9e8271

File tree

3 files changed

+35
-28
lines changed

3 files changed

+35
-28
lines changed

.github/workflows/tests.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
tests:
9+
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
python-version: [3.6, 3.7, 3.8, 3.9]
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v2
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Install dependencies
25+
run: |
26+
python3 -m pip install --upgrade pip doit
27+
python3 -m pip install .
28+
doit install_test_deps
29+
30+
- name: Test with pytest
31+
run: |
32+
doit test

.travis.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

tests/test_ignore.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ def test_conf_ignore_stderr(testdir):
2323
# Setup notebook with stream outputs
2424
nb = build_nb([
2525
"import sys",
26-
"sys.stdout.write('test\\n')",
27-
"sys.stderr.write('error output\\n')",
28-
"sys.stdout.write('test\\n')\nsys.stderr.write('error output\\n')",
26+
"print('test')",
27+
"print('error output', file=sys.stderr)",
28+
"print('test')\nprint('error output', file=sys.stderr)",
2929
], mark_run=True)
3030
nb.cells[1].outputs.append(nbformat.v4.new_output(
3131
'stream',

0 commit comments

Comments
 (0)