summaryrefslogtreecommitdiff
path: root/tests/test_pycco.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_pycco.py')
-rw-r--r--tests/test_pycco.py19
1 files changed, 4 insertions, 15 deletions
diff --git a/tests/test_pycco.py b/tests/test_pycco.py
index 8136c03..a1d1d84 100644
--- a/tests/test_pycco.py
+++ b/tests/test_pycco.py
@@ -1,11 +1,10 @@
-import copy
import os
import tempfile
import time
import pytest
-from hypothesis import given, example, assume
-from hypothesis.strategies import lists, text, booleans, choices, none
+from hypothesis import given, example
+from hypothesis.strategies import text, booleans, choices, none
import pycco.main as p
@@ -19,16 +18,6 @@ def get_language(choice):
return choice(list(p.languages.values()))
-@given(lists(text()), text())
-def test_shift(fragments, default):
- if fragments == []:
- assert p.shift(fragments, default) == default
- else:
- fragments2 = copy.copy(fragments)
- head = p.shift(fragments, default)
- assert [head] + fragments == fragments2
-
-
@given(text(), booleans(), text(min_size=1))
@example("/foo", True, "0")
def test_destination(filepath, preserve_paths, outdir):
@@ -63,8 +52,8 @@ def test_multi_line_leading_spaces():
def test_comment_with_only_cross_ref():
source = '''# ==Link Target==\n\ndef test_link():\n """[[testing.py#link-target]]"""\n pass'''
sections = p.parse(source, PYTHON)
- p.highlight(sections, PYTHON, outdir=tempfile.gettempdir())
- assert sections[1]['docs_html'] == '<p><a href="testing.html#link-target">testing.py</a></p>'
+ highlighted = p.highlight(sections, PYTHON, outdir=tempfile.gettempdir())
+ assert highlighted[1]['docs_html'] == '<p><a href="testing.html#link-target">testing.py</a></p>'
@given(text(), text())