Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the no_jupytext_version_number fixture #435

Merged
merged 1 commit into from
Feb 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions tests/test_read_simple_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,16 +534,14 @@ def test_read_write_script(pynb="""#!/usr/bin/env python
compare(pynb2, pynb)


def test_read_write_script_with_metadata_241(pynb="""#!/usr/bin/env python3
def test_read_write_script_with_metadata_241(no_jupytext_version_number, pynb="""#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# ---
# jupyter:
# jupytext:
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.4'
# jupytext_version: 1.1.2
# kernelspec:
# display_name: Python 3
# language: python
Expand All @@ -559,11 +557,7 @@ def test_read_write_script_with_metadata_241(pynb="""#!/usr/bin/env python3
assert 'encoding' in nb.metadata['jupytext']
pynb2 = jupytext.writes(nb, 'py')

# remove version information
def remove_version_info(text):
return '\n'.join([line for line in text.splitlines() if 'version' not in line])

compare(remove_version_info(pynb2), remove_version_info(pynb))
compare(pynb2, pynb)


def test_notebook_blank_lines(script="""# +
Expand Down