Skip to content

Commit

Permalink
Don't test for platform specific msgs on Windows
Browse files Browse the repository at this point in the history
This is to make AppVeyor happy.  I'm not going to chase down these tiny
little details.
  • Loading branch information
goerz committed Jan 11, 2020
1 parent 9e23ddd commit 3dedf1d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import logging
import platform
import subprocess
import sys
from distutils.dir_util import copy_tree
from pathlib import Path

Expand All @@ -29,6 +30,9 @@ def test_bad_config():
doctr_versions_menu_command, ['--debug', '--config', 'xxx']
)
assert result.exit_code != 0
if sys.platform.startswith('win'):
# Windows might have slightly different messages
return
msg = "Cannot read configuration file: File 'xxx' does not exist"
if platform.python_version().startswith('3.5'):
# Python 3.5 hits the IOError earlier, resulting in a different message
Expand Down Expand Up @@ -88,6 +92,9 @@ def test_custom_index_html(caplog):
assert (cwd / 'versions.json').is_file()
msg = "This is the index.html for the gh_pages_custom_index test."
assert msg in (cwd / 'index.html').read_text()
if sys.platform.startswith('win'):
# Windows might have slightly different messages
return
assert 'Using index.html template from index.html_t' in caplog.messages


Expand Down Expand Up @@ -119,6 +126,9 @@ def test_custom_downloads_file(caplog):
['html', 'https://host/v1.0.0/v1.0.0.zip'],
['epub', 'https://host/v1.0.0/v1.0.0.epub'],
]
if sys.platform.startswith('win'):
# Windows might have slightly different messages
return
assert 'Processing downloads_file master/downloads.md' in caplog.messages
assert 'INVALID URL: ./master/master.epub' in caplog.messages

Expand Down

0 comments on commit 3dedf1d

Please sign in to comment.