Skip to content

Commit 99c611f

Browse files
committed
Run tests with utf-8 encoding
1 parent a484162 commit 99c611f

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ install:
2828
- pip install --verbose .
2929
# command to run tests
3030
script:
31-
- python tests/rundoctest.py
31+
- make check
3232
- (cd docs && make html)
3333
cache:
3434
directories:

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,12 @@ build:
1212
install:
1313
$(PIP) install --no-index --ignore-installed .
1414

15+
check:
16+
$(PYTHON) tests/rundoctest.py
17+
1518
dist:
1619
chmod go+rX-w -R .
1720
umask 0022 && $(PYTHON) setup.py sdist --formats=gztar
1821

1922

20-
.PHONY: build install dist
23+
.PHONY: build install check dist

tests/rundoctest.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@
22

33
import os
44
import sys
5-
import cypari2
6-
import doctest
75

86
# Autogen tests must be run in the root dir, and with the proper module path
97
path = os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir))
108
os.chdir(path)
119
sys.path.append(path)
1210
import autogen
11+
import cypari2
12+
import doctest
13+
14+
# The doctests assume utf-8 encoding
15+
cypari2.string_utils.encoding = "utf-8"
1316

1417
failed = 0
1518
attempted = 0

0 commit comments

Comments
 (0)