Skip to content

Commit 8fdcc0d

Browse files
committed
Fix tests
1 parent 9bbf979 commit 8fdcc0d

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

markdown_it/cli/parse.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,13 @@ def convert_file(filename):
3434
sys.exit('Cannot open file "{}".'.format(filename))
3535

3636

37-
def interactive():
37+
def interactive(import_readline=False):
3838
"""
3939
Parse user input, dump to stdout, rinse and repeat.
4040
Python REPL style.
4141
"""
42-
_import_readline()
42+
if import_readline:
43+
_import_readline()
4344
print_heading()
4445
contents = []
4546
more = False

setup.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,7 @@ def get_version():
4747
install_requires=["attrs~=19.3"],
4848
extras_require={
4949
"code_style": ["flake8<3.8.0,>=3.7.0", "black==19.10b0", "pre-commit==1.17.0"],
50-
"testing": [
51-
"coverage",
52-
"pytest>=3.6,<4",
53-
"pytest-cov",
54-
"pytest-regressions",
55-
"readline",
56-
],
50+
"testing": ["coverage", "pytest>=3.6,<4", "pytest-cov", "pytest-regressions"],
5751
"rtd": ["sphinx>=2,<3", "myst-parser~=0.6.0a3", "pyyaml"],
5852
"benchmark": [
5953
"commonmark~=0.9.1",

tests/test_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def mock_input(prompt):
2424

2525
with patch("builtins.print") as patched:
2626
with patch("builtins.input", mock_input):
27-
parse.interactive()
27+
parse.interactive(import_readline=False)
2828
patched.assert_called()
2929

3030

0 commit comments

Comments
 (0)