Skip to content

Commit 27b1bf0

Browse files
authored
Merge pull request #113 from pycco-docs/zax/update-for-ci
Update for CI
2 parents f3d10b9 + 4d4ccc5 commit 27b1bf0

File tree

4 files changed

+14
-16
lines changed

4 files changed

+14
-16
lines changed

.travis.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ sudo: false
22
language: python
33
python:
44
- '2.7'
5-
- '3.5'
5+
- '3.6'
66
install:
77
- 'pip install -r requirements.txt'
88
- 'pip install -r requirements.test.txt'
@@ -13,8 +13,6 @@ after_success:
1313
- coveralls
1414
matrix:
1515
include:
16-
- python: 3.5
17-
env: CODESTYLE=true
1816
- python: 2.7
1917
env: TOXENV=py27
2018
install: pip install tox

requirements.test.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
coveralls==1.3.0
2-
hypothesis==3.56.5
1+
coveralls==1.9.2
2+
hypothesis==4.56.1
33
mock~=2.0
4-
pytest-cov~=2.0
4+
pytest-cov~=2.8.1

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
pystache==0.5.4
2-
Pygments==2.2.0
2+
Pygments==2.5.2
33
markdown==2.6.11

tests/test_pycco.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import pycco.generate_index as generate_index
1212
import pycco.main as p
1313
from hypothesis import assume, example, given
14-
from hypothesis.strategies import booleans, choices, lists, none, text
14+
from hypothesis.strategies import booleans, lists, none, text, sampled_from, data
1515
from pycco.languages import supported_languages
1616

1717
try:
@@ -26,8 +26,8 @@
2626
FOO_FUNCTION = """def foo():\n return True"""
2727

2828

29-
def get_language(choice):
30-
return choice(list(supported_languages.values()))
29+
def get_language(data):
30+
return data.draw(sampled_from(list(supported_languages.values())))
3131

3232

3333
@given(lists(text()), text())
@@ -49,9 +49,9 @@ def test_destination(filepath, preserve_paths, outdir):
4949
assert dest.endswith(".html")
5050

5151

52-
@given(choices(), text())
53-
def test_parse(choice, source):
54-
lang = get_language(choice)
52+
@given(data(), text())
53+
def test_parse(data, source):
54+
lang = get_language(data)
5555
parsed = p.parse(source, lang)
5656
for s in parsed:
5757
assert {"code_text", "docs_text"} == set(s.keys())
@@ -163,9 +163,9 @@ def test_generate_documentation():
163163
p.generate_documentation(PYCCO_SOURCE, outdir=tempfile.gettempdir())
164164

165165

166-
@given(booleans(), booleans(), choices())
167-
def test_process(preserve_paths, index, choice):
168-
lang_name = choice([l["name"] for l in supported_languages.values()])
166+
@given(booleans(), booleans(), data())
167+
def test_process(preserve_paths, index, data):
168+
lang_name = data.draw(sampled_from([l["name"] for l in supported_languages.values()]))
169169
p.process([PYCCO_SOURCE], preserve_paths=preserve_paths,
170170
index=index,
171171
outdir=tempfile.gettempdir(),

0 commit comments

Comments
 (0)