summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Peveler <matt.peveler@gmail.com>2020-09-06 14:44:31 -0400
committerGitHub <noreply@github.com>2020-09-06 21:44:31 +0300
commit9f2fe56bb35f30ab3ccd071ae5ff222719433b31 (patch)
treed917f26ffd768bc04dc15661f9e8b052b89a9425
parentfba22e4d8e7adf414aca34272f6b6938b6797cb6 (diff)
downloadasciidoc-py3-9f2fe56bb35f30ab3ccd071ae5ff222719433b31.tar.gz
use DEFAULT_NEWLINE constant for line ending for generated test sources (#144)
Signed-off-by: Matthew Peveler <matt.peveler@gmail.com>
-rwxr-xr-xtests/testasciidoc.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/testasciidoc.py b/tests/testasciidoc.py
index 95aadf6..282d25d 100755
--- a/tests/testasciidoc.py
+++ b/tests/testasciidoc.py
@@ -13,6 +13,7 @@ import sys
sys.path.append(str(Path(__file__).resolve().parent.parent))
import asciidocapi # noqa: E402
+from asciidoc import DEFAULT_NEWLINE # noqa: E402
# Default backends.
BACKENDS = ('html4', 'xhtml11', 'docbook', 'docbook5', 'html5')
@@ -196,7 +197,7 @@ class AsciiDocTest(object):
os.mkdir(self.datadir)
with open(self.backend_filename(backend), 'w+', encoding='utf-8') as open_file:
print('WRITING: %s' % open_file.name)
- open_file.writelines([s + os.linesep for s in lines])
+ open_file.writelines([s + DEFAULT_NEWLINE for s in lines])
def update(self, backend=None, force=False):
"""