summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZach Smith <zd@zdsmith.com>2019-12-20 14:41:42 -0500
committerZach Smith <zd@zdsmith.com>2019-12-20 14:41:42 -0500
commit4d4ccc579ed52463039eca41a4d7914dab73b8a0 (patch)
treecb8b54bc1f709bb5dd7556a933e16c61cfb71837
parentf3d10b945e176285185af9fe7e453db99d289d9e (diff)
downloadpycco-4d4ccc579ed52463039eca41a4d7914dab73b8a0.tar.gz
Update for CI
-rw-r--r--.travis.yml4
-rw-r--r--requirements.test.txt6
-rw-r--r--requirements.txt2
-rw-r--r--tests/test_pycco.py18
4 files changed, 14 insertions, 16 deletions
diff --git a/.travis.yml b/.travis.yml
index a4d0789..e90d4d1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,7 +2,7 @@ sudo: false
language: python
python:
- '2.7'
- - '3.5'
+ - '3.6'
install:
- 'pip install -r requirements.txt'
- 'pip install -r requirements.test.txt'
@@ -13,8 +13,6 @@ after_success:
- coveralls
matrix:
include:
- - python: 3.5
- env: CODESTYLE=true
- python: 2.7
env: TOXENV=py27
install: pip install tox
diff --git a/requirements.test.txt b/requirements.test.txt
index 3ba721c..6204ba8 100644
--- a/requirements.test.txt
+++ b/requirements.test.txt
@@ -1,4 +1,4 @@
-coveralls==1.3.0
-hypothesis==3.56.5
+coveralls==1.9.2
+hypothesis==4.56.1
mock~=2.0
-pytest-cov~=2.0
+pytest-cov~=2.8.1
diff --git a/requirements.txt b/requirements.txt
index 7980f04..51d4a95 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,3 +1,3 @@
pystache==0.5.4
-Pygments==2.2.0
+Pygments==2.5.2
markdown==2.6.11
diff --git a/tests/test_pycco.py b/tests/test_pycco.py
index 845bfe8..0bca077 100644
--- a/tests/test_pycco.py
+++ b/tests/test_pycco.py
@@ -11,7 +11,7 @@ import pytest
import pycco.generate_index as generate_index
import pycco.main as p
from hypothesis import assume, example, given
-from hypothesis.strategies import booleans, choices, lists, none, text
+from hypothesis.strategies import booleans, lists, none, text, sampled_from, data
from pycco.languages import supported_languages
try:
@@ -26,8 +26,8 @@ PYCCO_SOURCE = 'pycco/main.py'
FOO_FUNCTION = """def foo():\n return True"""
-def get_language(choice):
- return choice(list(supported_languages.values()))
+def get_language(data):
+ return data.draw(sampled_from(list(supported_languages.values())))
@given(lists(text()), text())
@@ -49,9 +49,9 @@ def test_destination(filepath, preserve_paths, outdir):
assert dest.endswith(".html")
-@given(choices(), text())
-def test_parse(choice, source):
- lang = get_language(choice)
+@given(data(), text())
+def test_parse(data, source):
+ lang = get_language(data)
parsed = p.parse(source, lang)
for s in parsed:
assert {"code_text", "docs_text"} == set(s.keys())
@@ -163,9 +163,9 @@ def test_generate_documentation():
p.generate_documentation(PYCCO_SOURCE, outdir=tempfile.gettempdir())
-@given(booleans(), booleans(), choices())
-def test_process(preserve_paths, index, choice):
- lang_name = choice([l["name"] for l in supported_languages.values()])
+@given(booleans(), booleans(), data())
+def test_process(preserve_paths, index, data):
+ lang_name = data.draw(sampled_from([l["name"] for l in supported_languages.values()]))
p.process([PYCCO_SOURCE], preserve_paths=preserve_paths,
index=index,
outdir=tempfile.gettempdir(),