Skip to content

Commit

Permalink
Fix change to test
Browse files Browse the repository at this point in the history
  • Loading branch information
jayqi committed Jul 2, 2020
1 parent 5095d2e commit 1412c15
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ def test_version():


def test_main_python_m():
result = subprocess.run(["python", "-m", "nbautoexport"], capture_output=True, text=True)
result = subprocess.run(
["python", "-m", "nbautoexport"],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
universal_newlines=True,
)
assert result.returncode == 0
assert "Exports Jupyter notebooks to various file formats" in result.stdout
assert result.stdout.startswith("Usage: python -m nbautoexport")
Expand All @@ -43,7 +48,7 @@ def test_version_python_m():
["python", "-m", "nbautoexport", "--version"],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True,
universal_newlines=True,
)
assert result.returncode == 0
assert result.stdout.strip() == __version__
2 changes: 1 addition & 1 deletion tests/test_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_export_notebook(notebooks_dir, organize_by):
export_notebook(notebook.path, config)

expected_exports = set()
for fmt in ExportFormat:
for fmt in EXPORT_FORMATS_TO_TEST:
if organize_by == "extension":
subfolder = notebooks_dir / fmt.value
elif organize_by == "notebook":
Expand Down

0 comments on commit 1412c15

Please sign in to comment.