diff --git a/tests/conftest.py b/tests/conftest.py index 53f8ac53e..d6e889d51 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -16,7 +16,7 @@ from .utils import formats_with_support_for_cell_metadata -# Pytest's tmpdir is in /tmp (at least for me), so this helps avoiding interferences between +# Pytest's tmpdir is in /tmp (at least for me), so this helps to avoid interferences between # global configuration on HOME and the test collection jupytext.config.JUPYTEXT_CEILING_DIRECTORIES = ["/tmp/"] diff --git a/tests/functional/__init__.py b/tests/functional/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/functional/cli/__init__.py b/tests/functional/cli/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/test_black.py b/tests/functional/cli/test_black.py similarity index 99% rename from tests/test_black.py rename to tests/functional/cli/test_black.py index 396e737b8..ed8a0377b 100644 --- a/tests/test_black.py +++ b/tests/functional/cli/test_black.py @@ -11,7 +11,7 @@ from jupytext.compare import compare, compare_cells, compare_notebooks from jupytext.header import _DEFAULT_NOTEBOOK_METADATA -from .utils import list_notebooks, requires_autopep8, requires_black, requires_flake8 +from ...utils import list_notebooks, requires_autopep8, requires_black, requires_flake8 @requires_black diff --git a/tests/test_cli.py b/tests/functional/cli/test_cli.py similarity index 99% rename from tests/test_cli.py rename to tests/functional/cli/test_cli.py index 1b613b175..d04c614f2 100644 --- a/tests/test_cli.py +++ b/tests/functional/cli/test_cli.py @@ -19,7 +19,7 @@ from jupytext.formats import JupytextFormatError, long_form_one_format from jupytext.paired_paths import InconsistentPath, paired_paths -from .utils import ( +from ...utils import ( list_notebooks, requires_jupytext_installed, requires_myst, diff --git a/tests/test_cli_check.py b/tests/functional/cli/test_cli_check.py similarity index 96% rename from tests/test_cli_check.py rename to tests/functional/cli/test_cli_check.py index cbc469441..3fe4e4782 100644 --- a/tests/test_cli_check.py +++ b/tests/functional/cli/test_cli_check.py @@ -4,7 +4,7 @@ from jupytext import write from jupytext.cli import jupytext -from .utils import requires_black +from ...utils import requires_black @pytest.fixture diff --git a/tests/test_cli_config.py b/tests/functional/cli/test_cli_config.py similarity index 100% rename from tests/test_cli_config.py rename to tests/functional/cli/test_cli_config.py diff --git a/tests/test_execute.py b/tests/functional/cli/test_execute.py similarity index 99% rename from tests/test_execute.py rename to tests/functional/cli/test_execute.py index b1c65fb53..cfa44a35c 100644 --- a/tests/test_execute.py +++ b/tests/functional/cli/test_execute.py @@ -7,7 +7,7 @@ from jupytext.cli import jupytext from jupytext.version import __version__ -from .utils import ( +from ...utils import ( requires_ir_kernel, requires_nbconvert, requires_user_kernel_python3, diff --git a/tests/test_isort.py b/tests/functional/cli/test_isort.py similarity index 95% rename from tests/test_isort.py rename to tests/functional/cli/test_isort.py index 0c03ca17e..b59da9ef2 100644 --- a/tests/test_isort.py +++ b/tests/functional/cli/test_isort.py @@ -2,7 +2,7 @@ from jupytext.cli import pipe_notebook from jupytext.compare import compare -from .utils import requires_isort +from ...utils import requires_isort @requires_isort diff --git a/tests/functional/contents_manager/__init__.py b/tests/functional/contents_manager/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/test_cm_config.py b/tests/functional/contents_manager/test_cm_config.py similarity index 99% rename from tests/test_cm_config.py rename to tests/functional/contents_manager/test_cm_config.py index 2e0d6c744..dad3a7502 100644 --- a/tests/test_cm_config.py +++ b/tests/functional/contents_manager/test_cm_config.py @@ -11,8 +11,7 @@ import jupytext from jupytext import TextFileContentsManager from jupytext.compare import compare_cells - -from .utils import notebook_model +from tests.utils import notebook_model SAMPLE_NOTEBOOK = new_notebook( cells=[new_markdown_cell("A Markdown cell"), new_code_cell("# A code cell\n1 + 1")] diff --git a/tests/test_contentsmanager.py b/tests/functional/contents_manager/test_contentsmanager.py similarity index 99% rename from tests/test_contentsmanager.py rename to tests/functional/contents_manager/test_contentsmanager.py index 1a9ec42e4..a434bbacd 100644 --- a/tests/test_contentsmanager.py +++ b/tests/functional/contents_manager/test_contentsmanager.py @@ -17,7 +17,7 @@ from jupytext.jupytext import read, write, writes from jupytext.kernels import kernelspec_from_language -from .utils import ( +from ...utils import ( list_notebooks, notebook_model, requires_pandoc, diff --git a/tests/test_load_multiple.py b/tests/functional/contents_manager/test_load_multiple.py similarity index 100% rename from tests/test_load_multiple.py rename to tests/functional/contents_manager/test_load_multiple.py diff --git a/tests/functional/docs/__init__.py b/tests/functional/docs/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/test_changelog.py b/tests/functional/docs/test_changelog.py similarity index 92% rename from tests/test_changelog.py rename to tests/functional/docs/test_changelog.py index 787a560e9..fd6a31af7 100644 --- a/tests/test_changelog.py +++ b/tests/functional/docs/test_changelog.py @@ -34,7 +34,7 @@ def test_replace_issue_numbers_with_links(input, output): sys.version_info < (3, 5), reason="'PosixPath' object has no attribute 'read_text'" ) def test_update_changelog(): - changelog_file = Path(__file__).parent.parent / "CHANGELOG.md" + changelog_file = Path(__file__).parent.parent.parent.parent / "CHANGELOG.md" cur_text = changelog_file.read_text() new_text = replace_issue_number_with_links(cur_text) if cur_text != new_text: diff --git a/tests/test_doc_files_are_notebooks.py b/tests/functional/docs/test_doc_files_are_notebooks.py similarity index 88% rename from tests/test_doc_files_are_notebooks.py rename to tests/functional/docs/test_doc_files_are_notebooks.py index bc2ed2492..12d436554 100644 --- a/tests/test_doc_files_are_notebooks.py +++ b/tests/functional/docs/test_doc_files_are_notebooks.py @@ -6,7 +6,7 @@ def documentation_files(): - for path in (Path(__file__).parent.parent / "docs").iterdir(): + for path in (Path(__file__).parent / "../../../docs").iterdir(): if path.suffix == ".md": yield path diff --git a/tests/test_using_cli.py b/tests/functional/docs/test_using_cli.py similarity index 91% rename from tests/test_using_cli.py rename to tests/functional/docs/test_using_cli.py index a0e54d86d..1ceea30e6 100644 --- a/tests/test_using_cli.py +++ b/tests/functional/docs/test_using_cli.py @@ -7,9 +7,9 @@ import jupytext from jupytext.cli import jupytext as jupytext_cli -from .utils import requires_black, requires_myst, requires_user_kernel_python3 +from ...utils import requires_black, requires_myst, requires_user_kernel_python3 -doc_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "docs") +doc_path = os.path.join(os.path.dirname(__file__), "..", "..", "..", "docs") @requires_user_kernel_python3 diff --git a/tests/integration/__init__.py b/tests/integration/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/integration/config/__init__.py b/tests/integration/config/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/test_config.py b/tests/integration/config/test_config.py similarity index 100% rename from tests/test_config.py rename to tests/integration/config/test_config.py diff --git a/tests/integration/metadata/__init__.py b/tests/integration/metadata/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/test_metadata_filter.py b/tests/integration/metadata/test_metadata_filter.py similarity index 99% rename from tests/test_metadata_filter.py rename to tests/integration/metadata/test_metadata_filter.py index 05004df45..8b73df561 100644 --- a/tests/test_metadata_filter.py +++ b/tests/integration/metadata/test_metadata_filter.py @@ -8,7 +8,7 @@ from jupytext.compare import compare, compare_notebooks from jupytext.metadata_filter import filter_metadata, metadata_filter_as_dict -from .utils import requires_myst +from ...utils import requires_myst def to_dict(keys): diff --git a/tests/test_metadata_filters_from_config.py b/tests/integration/metadata/test_metadata_filters_from_config.py similarity index 100% rename from tests/test_metadata_filters_from_config.py rename to tests/integration/metadata/test_metadata_filters_from_config.py diff --git a/tests/integration/others/__init__.py b/tests/integration/others/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/invalid_file_896.md b/tests/integration/others/invalid_file_896.md similarity index 100% rename from tests/invalid_file_896.md rename to tests/integration/others/invalid_file_896.md diff --git a/tests/test_active_cells.py b/tests/integration/others/test_active_cells.py similarity index 100% rename from tests/test_active_cells.py rename to tests/integration/others/test_active_cells.py diff --git a/tests/test_auto_ext.py b/tests/integration/others/test_auto_ext.py similarity index 98% rename from tests/test_auto_ext.py rename to tests/integration/others/test_auto_ext.py index ef0debc7f..445bf76de 100644 --- a/tests/test_auto_ext.py +++ b/tests/integration/others/test_auto_ext.py @@ -3,7 +3,7 @@ from jupytext import read, reads, writes from jupytext.formats import JupytextFormatError, auto_ext_from_metadata -from .utils import list_notebooks +from ...utils import list_notebooks @pytest.mark.parametrize( diff --git a/tests/test_cell_markers.py b/tests/integration/others/test_cell_markers.py similarity index 100% rename from tests/test_cell_markers.py rename to tests/integration/others/test_cell_markers.py diff --git a/tests/test_cell_metadata.py b/tests/integration/others/test_cell_metadata.py similarity index 100% rename from tests/test_cell_metadata.py rename to tests/integration/others/test_cell_metadata.py diff --git a/tests/test_cell_tags_are_preserved.py b/tests/integration/others/test_cell_tags_are_preserved.py similarity index 92% rename from tests/test_cell_tags_are_preserved.py rename to tests/integration/others/test_cell_tags_are_preserved.py index 1c20e5b30..01552513c 100644 --- a/tests/test_cell_tags_are_preserved.py +++ b/tests/integration/others/test_cell_tags_are_preserved.py @@ -2,8 +2,7 @@ from nbformat.v4.nbbase import new_code_cell, new_markdown_cell from jupytext import reads, writes - -from .utils import formats_with_support_for_cell_metadata, is_myst_available +from tests.utils import formats_with_support_for_cell_metadata, is_myst_available @pytest.fixture() diff --git a/tests/test_cells.py b/tests/integration/others/test_cells.py similarity index 100% rename from tests/test_cells.py rename to tests/integration/others/test_cells.py diff --git a/tests/test_combine.py b/tests/integration/others/test_combine.py similarity index 99% rename from tests/test_combine.py rename to tests/integration/others/test_combine.py index bb658ac09..6968d53f5 100644 --- a/tests/test_combine.py +++ b/tests/integration/others/test_combine.py @@ -6,8 +6,7 @@ import jupytext from jupytext.combine import combine_inputs_with_outputs from jupytext.compare import compare, compare_notebooks - -from .utils import list_notebooks +from tests.utils import list_notebooks def test_combine(): diff --git a/tests/test_custom_cell_magics.py b/tests/integration/others/test_custom_cell_magics.py similarity index 100% rename from tests/test_custom_cell_magics.py rename to tests/integration/others/test_custom_cell_magics.py diff --git a/tests/test_doxygen.py b/tests/integration/others/test_doxygen.py similarity index 100% rename from tests/test_doxygen.py rename to tests/integration/others/test_doxygen.py diff --git a/tests/test_hide_remove_input_outputs_rmarkdown.py b/tests/integration/others/test_hide_remove_input_outputs_rmarkdown.py similarity index 100% rename from tests/test_hide_remove_input_outputs_rmarkdown.py rename to tests/integration/others/test_hide_remove_input_outputs_rmarkdown.py diff --git a/tests/test_invalid_file.py b/tests/integration/others/test_invalid_file.py similarity index 96% rename from tests/test_invalid_file.py rename to tests/integration/others/test_invalid_file.py index ba7cf8ec1..102317d40 100644 --- a/tests/test_invalid_file.py +++ b/tests/integration/others/test_invalid_file.py @@ -8,7 +8,7 @@ from jupytext import TextFileContentsManager, read from jupytext.cli import jupytext as jupytext_cli -from .utils import skip_on_windows +from ...utils import skip_on_windows @pytest.fixture diff --git a/tests/test_jupytext_errors.py b/tests/integration/others/test_jupytext_errors.py similarity index 100% rename from tests/test_jupytext_errors.py rename to tests/integration/others/test_jupytext_errors.py diff --git a/tests/test_jupytext_read.py b/tests/integration/others/test_jupytext_read.py similarity index 100% rename from tests/test_jupytext_read.py rename to tests/integration/others/test_jupytext_read.py diff --git a/tests/test_nbformat_version.py b/tests/integration/others/test_nbformat_version.py similarity index 100% rename from tests/test_nbformat_version.py rename to tests/integration/others/test_nbformat_version.py diff --git a/tests/test_preserve_empty_cells.py b/tests/integration/others/test_preserve_empty_cells.py similarity index 100% rename from tests/test_preserve_empty_cells.py rename to tests/integration/others/test_preserve_empty_cells.py diff --git a/tests/test_pytest.py b/tests/integration/others/test_pytest.py similarity index 100% rename from tests/test_pytest.py rename to tests/integration/others/test_pytest.py diff --git a/tests/test_raw_strings.py b/tests/integration/others/test_raw_strings.py similarity index 100% rename from tests/test_raw_strings.py rename to tests/integration/others/test_raw_strings.py diff --git a/tests/test_read_write_functions.py b/tests/integration/others/test_read_write_functions.py similarity index 100% rename from tests/test_read_write_functions.py rename to tests/integration/others/test_read_write_functions.py diff --git a/tests/test_remove_encoding.py b/tests/integration/others/test_remove_encoding.py similarity index 100% rename from tests/test_remove_encoding.py rename to tests/integration/others/test_remove_encoding.py diff --git a/tests/test_sample_notebooks_are_normalized.py b/tests/integration/others/test_sample_notebooks_are_normalized.py similarity index 94% rename from tests/test_sample_notebooks_are_normalized.py rename to tests/integration/others/test_sample_notebooks_are_normalized.py index 54c65fc40..2a6922f85 100644 --- a/tests/test_sample_notebooks_are_normalized.py +++ b/tests/integration/others/test_sample_notebooks_are_normalized.py @@ -3,7 +3,7 @@ import jupytext -from .utils import list_notebooks +from ...utils import list_notebooks @pytest.mark.skipif(nbformat.__version__ <= "5.7", reason="normalize is not available") diff --git a/tests/test_save_multiple.py b/tests/integration/others/test_save_multiple.py similarity index 98% rename from tests/test_save_multiple.py rename to tests/integration/others/test_save_multiple.py index 0a7fb62c0..4d92f0abd 100644 --- a/tests/test_save_multiple.py +++ b/tests/integration/others/test_save_multiple.py @@ -9,7 +9,7 @@ from jupytext.compare import compare_notebooks from jupytext.contentsmanager import TextFileContentsManager -from .utils import list_notebooks, notebook_model +from ...utils import list_notebooks, notebook_model @pytest.mark.parametrize("nb_file", list_notebooks(skip="66")) diff --git a/tests/test_trust_notebook.py b/tests/integration/others/test_trust_notebook.py similarity index 99% rename from tests/test_trust_notebook.py rename to tests/integration/others/test_trust_notebook.py index 1a2b7c13b..504134bfb 100644 --- a/tests/test_trust_notebook.py +++ b/tests/integration/others/test_trust_notebook.py @@ -7,7 +7,7 @@ from jupytext.compare import compare_notebooks from jupytext.contentsmanager import TextFileContentsManager -from .utils import list_notebooks, requires_myst +from ...utils import list_notebooks, requires_myst @pytest.mark.parametrize("nb_file", list_notebooks("python")) diff --git a/tests/test_unicode.py b/tests/integration/others/test_unicode.py similarity index 98% rename from tests/test_unicode.py rename to tests/integration/others/test_unicode.py index 81ef043e1..0946058a7 100644 --- a/tests/test_unicode.py +++ b/tests/integration/others/test_unicode.py @@ -4,7 +4,7 @@ import jupytext from jupytext.compare import compare -from .utils import list_notebooks +from ...utils import list_notebooks @pytest.mark.parametrize("nb_file", list_notebooks() + list_notebooks("Rmd")) diff --git a/tests/test_write_does_not_modify_notebook.py b/tests/integration/others/test_write_does_not_modify_notebook.py similarity index 95% rename from tests/test_write_does_not_modify_notebook.py rename to tests/integration/others/test_write_does_not_modify_notebook.py index 3e1873a57..492743d58 100644 --- a/tests/test_write_does_not_modify_notebook.py +++ b/tests/integration/others/test_write_does_not_modify_notebook.py @@ -7,7 +7,7 @@ from jupytext.compare import compare from jupytext.formats import long_form_one_format -from .utils import list_notebooks +from ...utils import list_notebooks @pytest.mark.parametrize( diff --git a/tests/integration/round_trip/__init__.py b/tests/integration/round_trip/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/test_jupytext_nbconvert_round_trip.py b/tests/integration/round_trip/test_jupytext_nbconvert_round_trip.py similarity index 98% rename from tests/test_jupytext_nbconvert_round_trip.py rename to tests/integration/round_trip/test_jupytext_nbconvert_round_trip.py index 4bd6022d6..5e5325206 100644 --- a/tests/test_jupytext_nbconvert_round_trip.py +++ b/tests/integration/round_trip/test_jupytext_nbconvert_round_trip.py @@ -3,7 +3,7 @@ import jupytext from jupytext.header import header_to_metadata_and_cell -from .utils import list_notebooks, requires_nbconvert +from ...utils import list_notebooks, requires_nbconvert @requires_nbconvert diff --git a/tests/test_mirror.py b/tests/integration/round_trip/test_mirror.py similarity index 99% rename from tests/test_mirror.py rename to tests/integration/round_trip/test_mirror.py index 9d621ca99..c55cc9110 100644 --- a/tests/test_mirror.py +++ b/tests/integration/round_trip/test_mirror.py @@ -18,7 +18,7 @@ from jupytext.languages import _SCRIPT_EXTENSIONS from jupytext.paired_paths import full_path -from .utils import ( +from ...utils import ( list_notebooks, requires_myst, requires_pandoc, diff --git a/tests/test_read_all_py.py b/tests/integration/round_trip/test_read_all_py.py similarity index 92% rename from tests/test_read_all_py.py rename to tests/integration/round_trip/test_read_all_py.py index bf31cd9a2..44f27e0eb 100644 --- a/tests/test_read_all_py.py +++ b/tests/integration/round_trip/test_read_all_py.py @@ -3,7 +3,7 @@ import jupytext from jupytext.compare import compare -from .utils import list_notebooks +from ...utils import list_notebooks @pytest.mark.parametrize( diff --git a/tests/test_rmd_to_ipynb.py b/tests/integration/round_trip/test_rmd_to_ipynb.py similarity index 95% rename from tests/test_rmd_to_ipynb.py rename to tests/integration/round_trip/test_rmd_to_ipynb.py index 8a8d237cc..0b446d741 100644 --- a/tests/test_rmd_to_ipynb.py +++ b/tests/integration/round_trip/test_rmd_to_ipynb.py @@ -3,7 +3,7 @@ import jupytext from jupytext.compare import compare -from .utils import list_notebooks +from ...utils import list_notebooks @pytest.mark.parametrize("nb_file", list_notebooks("Rmd")) diff --git a/tests/integration/simple_notebooks/__init__.py b/tests/integration/simple_notebooks/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/test_ipynb_to_R.py b/tests/integration/simple_notebooks/test_ipynb_to_R.py similarity index 93% rename from tests/test_ipynb_to_R.py rename to tests/integration/simple_notebooks/test_ipynb_to_R.py index b7be46ed6..dfa840f3c 100644 --- a/tests/test_ipynb_to_R.py +++ b/tests/integration/simple_notebooks/test_ipynb_to_R.py @@ -6,7 +6,7 @@ import jupytext from jupytext.compare import compare_notebooks -from .utils import list_notebooks +from ...utils import list_notebooks @pytest.mark.parametrize( diff --git a/tests/test_ipynb_to_myst.py b/tests/integration/simple_notebooks/test_ipynb_to_myst.py similarity index 99% rename from tests/test_ipynb_to_myst.py rename to tests/integration/simple_notebooks/test_ipynb_to_myst.py index 8786a1aeb..5c1c4aad7 100644 --- a/tests/test_ipynb_to_myst.py +++ b/tests/integration/simple_notebooks/test_ipynb_to_myst.py @@ -22,7 +22,7 @@ myst_to_notebook, ) -from .utils import requires_myst, requires_no_myst +from ...utils import requires_myst, requires_no_myst @requires_myst diff --git a/tests/test_ipynb_to_py.py b/tests/integration/simple_notebooks/test_ipynb_to_py.py similarity index 93% rename from tests/test_ipynb_to_py.py rename to tests/integration/simple_notebooks/test_ipynb_to_py.py index 7a0915d7f..cf8721c7c 100644 --- a/tests/test_ipynb_to_py.py +++ b/tests/integration/simple_notebooks/test_ipynb_to_py.py @@ -4,7 +4,7 @@ import jupytext from jupytext.compare import compare_notebooks -from .utils import list_notebooks +from ...utils import list_notebooks @pytest.mark.parametrize("nb_file", list_notebooks("ipynb_py")) diff --git a/tests/test_ipynb_to_rmd.py b/tests/integration/simple_notebooks/test_ipynb_to_rmd.py similarity index 93% rename from tests/test_ipynb_to_rmd.py rename to tests/integration/simple_notebooks/test_ipynb_to_rmd.py index 5d61a6a61..f8bd0e690 100644 --- a/tests/test_ipynb_to_rmd.py +++ b/tests/integration/simple_notebooks/test_ipynb_to_rmd.py @@ -4,7 +4,7 @@ import jupytext from jupytext.compare import compare_notebooks -from .utils import list_notebooks +from ...utils import list_notebooks @pytest.mark.parametrize("nb_file", list_notebooks(skip="66")) diff --git a/tests/test_knitr_spin.py b/tests/integration/simple_notebooks/test_knitr_spin.py similarity index 92% rename from tests/test_knitr_spin.py rename to tests/integration/simple_notebooks/test_knitr_spin.py index 7c054e801..736ed9828 100644 --- a/tests/test_knitr_spin.py +++ b/tests/integration/simple_notebooks/test_knitr_spin.py @@ -2,7 +2,7 @@ import jupytext -from .utils import list_notebooks +from ...utils import list_notebooks @pytest.mark.parametrize("r_file", list_notebooks("R_spin")) diff --git a/tests/test_read_dotnet_try_markdown.py b/tests/integration/simple_notebooks/test_read_dotnet_try_markdown.py similarity index 100% rename from tests/test_read_dotnet_try_markdown.py rename to tests/integration/simple_notebooks/test_read_dotnet_try_markdown.py diff --git a/tests/test_read_empty_text_notebook.py b/tests/integration/simple_notebooks/test_read_empty_text_notebook.py similarity index 92% rename from tests/test_read_empty_text_notebook.py rename to tests/integration/simple_notebooks/test_read_empty_text_notebook.py index e931dfa00..0a96f09c1 100644 --- a/tests/test_read_empty_text_notebook.py +++ b/tests/integration/simple_notebooks/test_read_empty_text_notebook.py @@ -5,7 +5,7 @@ from jupytext.formats import NOTEBOOK_EXTENSIONS from jupytext.myst import myst_extensions -from .utils import is_myst_available, is_quarto_available +from ...utils import is_myst_available, is_quarto_available @pytest.mark.parametrize("ext", sorted(set(NOTEBOOK_EXTENSIONS) - {".ipynb"})) diff --git a/tests/test_read_folding_markers.py b/tests/integration/simple_notebooks/test_read_folding_markers.py similarity index 100% rename from tests/test_read_folding_markers.py rename to tests/integration/simple_notebooks/test_read_folding_markers.py diff --git a/tests/test_read_incomplete_rmd.py b/tests/integration/simple_notebooks/test_read_incomplete_rmd.py similarity index 100% rename from tests/test_read_incomplete_rmd.py rename to tests/integration/simple_notebooks/test_read_incomplete_rmd.py diff --git a/tests/test_read_simple_R.py b/tests/integration/simple_notebooks/test_read_simple_R.py similarity index 100% rename from tests/test_read_simple_R.py rename to tests/integration/simple_notebooks/test_read_simple_R.py diff --git a/tests/test_read_simple_clojure.py b/tests/integration/simple_notebooks/test_read_simple_clojure.py similarity index 100% rename from tests/test_read_simple_clojure.py rename to tests/integration/simple_notebooks/test_read_simple_clojure.py diff --git a/tests/test_read_simple_csharp.py b/tests/integration/simple_notebooks/test_read_simple_csharp.py similarity index 100% rename from tests/test_read_simple_csharp.py rename to tests/integration/simple_notebooks/test_read_simple_csharp.py diff --git a/tests/test_read_simple_groovy.py b/tests/integration/simple_notebooks/test_read_simple_groovy.py similarity index 100% rename from tests/test_read_simple_groovy.py rename to tests/integration/simple_notebooks/test_read_simple_groovy.py diff --git a/tests/test_read_simple_hydrogen.py b/tests/integration/simple_notebooks/test_read_simple_hydrogen.py similarity index 100% rename from tests/test_read_simple_hydrogen.py rename to tests/integration/simple_notebooks/test_read_simple_hydrogen.py diff --git a/tests/test_read_simple_ipynb.py b/tests/integration/simple_notebooks/test_read_simple_ipynb.py similarity index 100% rename from tests/test_read_simple_ipynb.py rename to tests/integration/simple_notebooks/test_read_simple_ipynb.py diff --git a/tests/test_read_simple_java.py b/tests/integration/simple_notebooks/test_read_simple_java.py similarity index 100% rename from tests/test_read_simple_java.py rename to tests/integration/simple_notebooks/test_read_simple_java.py diff --git a/tests/test_read_simple_julia.py b/tests/integration/simple_notebooks/test_read_simple_julia.py similarity index 100% rename from tests/test_read_simple_julia.py rename to tests/integration/simple_notebooks/test_read_simple_julia.py diff --git a/tests/test_read_simple_markdown.py b/tests/integration/simple_notebooks/test_read_simple_markdown.py similarity index 100% rename from tests/test_read_simple_markdown.py rename to tests/integration/simple_notebooks/test_read_simple_markdown.py diff --git a/tests/test_read_simple_matlab.py b/tests/integration/simple_notebooks/test_read_simple_matlab.py similarity index 100% rename from tests/test_read_simple_matlab.py rename to tests/integration/simple_notebooks/test_read_simple_matlab.py diff --git a/tests/test_read_simple_nomarker.py b/tests/integration/simple_notebooks/test_read_simple_nomarker.py similarity index 100% rename from tests/test_read_simple_nomarker.py rename to tests/integration/simple_notebooks/test_read_simple_nomarker.py diff --git a/tests/test_read_simple_ocaml.py b/tests/integration/simple_notebooks/test_read_simple_ocaml.py similarity index 100% rename from tests/test_read_simple_ocaml.py rename to tests/integration/simple_notebooks/test_read_simple_ocaml.py diff --git a/tests/test_read_simple_pandoc.py b/tests/integration/simple_notebooks/test_read_simple_pandoc.py similarity index 97% rename from tests/test_read_simple_pandoc.py rename to tests/integration/simple_notebooks/test_read_simple_pandoc.py index c0c24d461..e4075f0f9 100644 --- a/tests/test_read_simple_pandoc.py +++ b/tests/integration/simple_notebooks/test_read_simple_pandoc.py @@ -6,7 +6,7 @@ from jupytext.compare import compare, compare_notebooks from jupytext.pandoc import PandocError -from .utils import requires_no_pandoc, requires_pandoc +from ...utils import requires_no_pandoc, requires_pandoc @requires_pandoc diff --git a/tests/test_read_simple_percent.py b/tests/integration/simple_notebooks/test_read_simple_percent.py similarity index 99% rename from tests/test_read_simple_percent.py rename to tests/integration/simple_notebooks/test_read_simple_percent.py index 357a443ba..21522a076 100644 --- a/tests/test_read_simple_percent.py +++ b/tests/integration/simple_notebooks/test_read_simple_percent.py @@ -11,7 +11,7 @@ import jupytext from jupytext.compare import compare, compare_notebooks -from .utils import notebook_model +from ...utils import notebook_model def test_read_simple_file( diff --git a/tests/test_read_simple_python.py b/tests/integration/simple_notebooks/test_read_simple_python.py similarity index 100% rename from tests/test_read_simple_python.py rename to tests/integration/simple_notebooks/test_read_simple_python.py diff --git a/tests/test_read_simple_quarto.py b/tests/integration/simple_notebooks/test_read_simple_quarto.py similarity index 95% rename from tests/test_read_simple_quarto.py rename to tests/integration/simple_notebooks/test_read_simple_quarto.py index 1e50c2394..aa84a82a5 100644 --- a/tests/test_read_simple_quarto.py +++ b/tests/integration/simple_notebooks/test_read_simple_quarto.py @@ -3,7 +3,7 @@ import jupytext from jupytext.compare import compare, compare_notebooks -from .utils import requires_quarto +from ...utils import requires_quarto @requires_quarto diff --git a/tests/test_read_simple_rmd.py b/tests/integration/simple_notebooks/test_read_simple_rmd.py similarity index 100% rename from tests/test_read_simple_rmd.py rename to tests/integration/simple_notebooks/test_read_simple_rmd.py diff --git a/tests/test_read_simple_rust.py b/tests/integration/simple_notebooks/test_read_simple_rust.py similarity index 100% rename from tests/test_read_simple_rust.py rename to tests/integration/simple_notebooks/test_read_simple_rust.py diff --git a/tests/test_read_simple_scheme.py b/tests/integration/simple_notebooks/test_read_simple_scheme.py similarity index 100% rename from tests/test_read_simple_scheme.py rename to tests/integration/simple_notebooks/test_read_simple_scheme.py diff --git a/tests/test_read_simple_sphinx.py b/tests/integration/simple_notebooks/test_read_simple_sphinx.py similarity index 100% rename from tests/test_read_simple_sphinx.py rename to tests/integration/simple_notebooks/test_read_simple_sphinx.py diff --git a/tests/unit/__init__.py b/tests/unit/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/test_cell_id.py b/tests/unit/test_cell_id.py similarity index 100% rename from tests/test_cell_id.py rename to tests/unit/test_cell_id.py diff --git a/tests/test_compare.py b/tests/unit/test_compare.py similarity index 100% rename from tests/test_compare.py rename to tests/unit/test_compare.py diff --git a/tests/test_escape_magics.py b/tests/unit/test_escape_magics.py similarity index 99% rename from tests/test_escape_magics.py rename to tests/unit/test_escape_magics.py index 36c5bb05c..d6bd6de56 100644 --- a/tests/test_escape_magics.py +++ b/tests/unit/test_escape_magics.py @@ -11,7 +11,7 @@ unesc, ) -from .utils import notebook_model +from ..utils import notebook_model def test_unesc(): diff --git a/tests/test_formats.py b/tests/unit/test_formats.py similarity index 99% rename from tests/test_formats.py rename to tests/unit/test_formats.py index bdae30112..260c8a44e 100644 --- a/tests/test_formats.py +++ b/tests/unit/test_formats.py @@ -16,7 +16,7 @@ validate_one_format, ) -from .utils import list_notebooks, requires_myst, requires_pandoc +from ..utils import list_notebooks, requires_myst, requires_pandoc @pytest.mark.parametrize("nb_file", list_notebooks("python")) diff --git a/tests/test_header.py b/tests/unit/test_header.py similarity index 100% rename from tests/test_header.py rename to tests/unit/test_header.py diff --git a/tests/test_markdown_in_code_cells.py b/tests/unit/test_markdown_in_code_cells.py similarity index 98% rename from tests/test_markdown_in_code_cells.py rename to tests/unit/test_markdown_in_code_cells.py index 73cb0638b..0cf13f2ce 100644 --- a/tests/test_markdown_in_code_cells.py +++ b/tests/unit/test_markdown_in_code_cells.py @@ -5,7 +5,7 @@ from jupytext.cell_to_text import three_backticks_or_more from jupytext.compare import compare, compare_notebooks -from .utils import requires_myst +from ..utils import requires_myst def test_three_backticks_or_more(): diff --git a/tests/test_paired_paths.py b/tests/unit/test_paired_paths.py similarity index 100% rename from tests/test_paired_paths.py rename to tests/unit/test_paired_paths.py diff --git a/tests/test_pep8.py b/tests/unit/test_pep8.py similarity index 99% rename from tests/test_pep8.py rename to tests/unit/test_pep8.py index bf873415c..3914c1191 100644 --- a/tests/test_pep8.py +++ b/tests/unit/test_pep8.py @@ -11,7 +11,7 @@ pep8_lines_between_cells, ) -from .utils import list_notebooks +from ..utils import list_notebooks def test_next_instruction_is_function_or_class(): diff --git a/tests/test_stringparser.py b/tests/unit/test_stringparser.py similarity index 100% rename from tests/test_stringparser.py rename to tests/unit/test_stringparser.py