diff --git a/.dependabot/config.yml b/.dependabot/config.yml deleted file mode 100644 index 4584924..0000000 --- a/.dependabot/config.yml +++ /dev/null @@ -1,9 +0,0 @@ -# This file is managed by 'repo_helper'. Don't edit it directly. ---- -version: 1 -update_configs: -- package_manager: python - directory: / - update_schedule: weekly - default_reviewers: - - domdfcoding diff --git a/.github/dependabot.yml b/.github/dependabot.yml index e769ad3..454225a 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,5 +6,6 @@ updates: directory: / schedule: interval: weekly + open-pull-requests-limit: 0 reviewers: - domdfcoding diff --git a/.github/workflows/docs_test_action.yml b/.github/workflows/docs_test_action.yml index b09bde3..8f60ba5 100644 --- a/.github/workflows/docs_test_action.yml +++ b/.github/workflows/docs_test_action.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout 🛎️ - uses: "actions/checkout@v3" + uses: "actions/checkout@v4" - name: Check for changed files uses: dorny/paths-filter@v2 diff --git a/.github/workflows/flake8.yml b/.github/workflows/flake8.yml index 8221173..af1b394 100644 --- a/.github/workflows/flake8.yml +++ b/.github/workflows/flake8.yml @@ -16,11 +16,11 @@ permissions: jobs: Run: name: "Flake8" - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-22.04" steps: - name: Checkout 🛎️ - uses: "actions/checkout@v3" + uses: "actions/checkout@v4" - name: Check for changed files uses: dorny/paths-filter@v2 @@ -33,7 +33,7 @@ jobs: - name: Setup Python 🐍 if: steps.changes.outputs.code == 'true' - uses: "actions/setup-python@v4" + uses: "actions/setup-python@v5" with: python-version: "3.8" diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index 9b28b5f..bd74787 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -20,12 +20,12 @@ jobs: strategy: matrix: - os: ['ubuntu-20.04', 'windows-2019'] + os: ['ubuntu-22.04', 'windows-2019'] fail-fast: false steps: - name: Checkout 🛎️ - uses: "actions/checkout@v3" + uses: "actions/checkout@v4" - name: Check for changed files uses: dorny/paths-filter@v2 @@ -38,7 +38,7 @@ jobs: - name: Setup Python 🐍 if: steps.changes.outputs.code == 'true' - uses: "actions/setup-python@v4" + uses: "actions/setup-python@v5" with: python-version: "3.8" diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index b6472e4..7f1196f 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -22,24 +22,23 @@ jobs: runs-on: "windows-2019" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-alpha.1' + USING_COVERAGE: '3.7,3.8,3.9,3.10,3.11,3.12,3.13' strategy: fail-fast: False matrix: config: - - {python-version: "3.6", testenvs: "py36-click{7,8},build", experimental: False} - {python-version: "3.7", testenvs: "py37-click{7,8},build", experimental: False} - {python-version: "3.8", testenvs: "py38-click{7,8},build", experimental: False} - {python-version: "3.9", testenvs: "py39-click{7,8},build", experimental: False} - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - {python-version: "3.11", testenvs: "py311-click{7,8},build", experimental: False} - {python-version: "3.12", testenvs: "py312-click{7,8},build", experimental: False} - - {python-version: "3.13.0-alpha.1", testenvs: "py313-dev-click{7,8},build", experimental: True} + - {python-version: "3.13", testenvs: "py313-click{7,8},build", experimental: False} steps: - name: Checkout 🛎️ - uses: "actions/checkout@v3" + uses: "actions/checkout@v4" - name: Check for changed files if: startsWith(github.ref, 'refs/tags/') != true @@ -54,7 +53,7 @@ jobs: - name: Setup Python 🐍 id: setup-python if: ${{ steps.changes.outputs.code == 'true' || steps.changes.outcome == 'skipped' }} - uses: "actions/setup-python@v4" + uses: "actions/setup-python@v5" with: python-version: "${{ matrix.config.python-version }}" @@ -71,8 +70,9 @@ jobs: run: python -m tox -e "${{ matrix.config.testenvs }}" -s false - name: "Upload Coverage 🚀" - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: ${{ always() && steps.setup-python.outcome == 'success' }} with: name: "coverage-${{ matrix.config.python-version }}" path: .coverage + include-hidden-files: true diff --git a/.github/workflows/python_ci_linux.yml b/.github/workflows/python_ci_linux.yml index 793eb05..6bbee2e 100644 --- a/.github/workflows/python_ci_linux.yml +++ b/.github/workflows/python_ci_linux.yml @@ -19,28 +19,27 @@ permissions: jobs: tests: - name: "ubuntu-20.04 / Python ${{ matrix.config.python-version }}" - runs-on: "ubuntu-20.04" + name: "ubuntu-22.04 / Python ${{ matrix.config.python-version }}" + runs-on: "ubuntu-22.04" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-alpha.1' + USING_COVERAGE: '3.7,3.8,3.9,3.10,3.11,3.12,3.13' strategy: fail-fast: False matrix: config: - - {python-version: "3.6", testenvs: "py36-click{7,8},build", experimental: False} - {python-version: "3.7", testenvs: "py37-click{7,8},build", experimental: False} - {python-version: "3.8", testenvs: "py38-click{7,8},build", experimental: False} - {python-version: "3.9", testenvs: "py39-click{7,8},build", experimental: False} - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - {python-version: "3.11", testenvs: "py311-click{7,8},build", experimental: False} - {python-version: "3.12", testenvs: "py312-click{7,8},build", experimental: False} - - {python-version: "3.13.0-alpha.1", testenvs: "py313-dev-click{7,8},build", experimental: True} + - {python-version: "3.13", testenvs: "py313-click{7,8},build", experimental: False} steps: - name: Checkout 🛎️ - uses: "actions/checkout@v3" + uses: "actions/checkout@v4" - name: Check for changed files if: startsWith(github.ref, 'refs/tags/') != true @@ -55,7 +54,7 @@ jobs: - name: Setup Python 🐍 id: setup-python if: ${{ steps.changes.outputs.code == 'true' || steps.changes.outcome == 'skipped' }} - uses: "actions/setup-python@v4" + uses: "actions/setup-python@v5" with: python-version: "${{ matrix.config.python-version }}" @@ -73,22 +72,23 @@ jobs: run: python -m tox -e "${{ matrix.config.testenvs }}" -s false - name: "Upload Coverage 🚀" - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: ${{ always() && steps.setup-python.outcome == 'success' }} with: name: "coverage-${{ matrix.config.python-version }}" path: .coverage + include-hidden-files: true Coverage: needs: tests - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-22.04" steps: - name: Checkout 🛎️ - uses: "actions/checkout@v3" + uses: "actions/checkout@v4" - name: Setup Python 🐍 - uses: "actions/setup-python@v4" + uses: "actions/setup-python@v5" with: python-version: 3.8 @@ -98,7 +98,7 @@ jobs: python -m pip install --upgrade "coveralls>=3.0.0" coverage_pyver_pragma - name: "Download Coverage 🪂" - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: path: coverage @@ -116,10 +116,11 @@ jobs: - name: "Upload Combined Coverage Artefact 🚀" if: ${{ steps.show.outcome != 'failure' }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: "combined-coverage" path: .coverage + include-hidden-files: true - name: "Upload Combined Coverage to Coveralls" if: ${{ steps.show.outcome != 'failure' }} @@ -131,14 +132,14 @@ jobs: Deploy: needs: tests - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-22.04" steps: - name: Checkout 🛎️ - uses: "actions/checkout@v3" + uses: "actions/checkout@v4" if: startsWith(github.ref, 'refs/tags/') - name: Setup Python 🐍 - uses: "actions/setup-python@v4" + uses: "actions/setup-python@v5" if: startsWith(github.ref, 'refs/tags/') with: python-version: 3.8 diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml index 603283a..b945833 100644 --- a/.github/workflows/python_ci_macos.yml +++ b/.github/workflows/python_ci_macos.yml @@ -18,28 +18,27 @@ permissions: jobs: tests: - name: "macos-latest / Python ${{ matrix.config.python-version }}" - runs-on: "macos-latest" + name: "macos-${{ matrix.config.os-ver }} / Python ${{ matrix.config.python-version }}" + runs-on: "macos-${{ matrix.config.os-ver }}" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-alpha.1' + USING_COVERAGE: '3.7,3.8,3.9,3.10,3.11,3.12,3.13' strategy: fail-fast: False matrix: config: - - {python-version: "3.6", testenvs: "py36-click{7,8},build", experimental: False} - - {python-version: "3.7", testenvs: "py37-click{7,8},build", experimental: False} - - {python-version: "3.8", testenvs: "py38-click{7,8},build", experimental: False} - - {python-version: "3.9", testenvs: "py39-click{7,8},build", experimental: False} - - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - - {python-version: "3.11", testenvs: "py311-click{7,8},build", experimental: False} - - {python-version: "3.12", testenvs: "py312-click{7,8},build", experimental: False} - - {python-version: "3.13.0-alpha.1", testenvs: "py313-dev-click{7,8},build", experimental: True} + - {python-version: "3.7", os-ver: "13", testenvs: "py37-click{7,8},build", experimental: False} + - {python-version: "3.8", os-ver: "14", testenvs: "py38-click{7,8},build", experimental: False} + - {python-version: "3.9", os-ver: "14", testenvs: "py39-click{7,8},build", experimental: False} + - {python-version: "3.10", os-ver: "14", testenvs: "py310-click{7,8},build", experimental: False} + - {python-version: "3.11", os-ver: "14", testenvs: "py311-click{7,8},build", experimental: False} + - {python-version: "3.12", os-ver: "14", testenvs: "py312-click{7,8},build", experimental: False} + - {python-version: "3.13", os-ver: "14", testenvs: "py313-click{7,8},build", experimental: False} steps: - name: Checkout 🛎️ - uses: "actions/checkout@v3" + uses: "actions/checkout@v4" - name: Check for changed files if: startsWith(github.ref, 'refs/tags/') != true @@ -54,7 +53,7 @@ jobs: - name: Setup Python 🐍 id: setup-python if: ${{ steps.changes.outputs.code == 'true' || steps.changes.outcome == 'skipped' }} - uses: "actions/setup-python@v4" + uses: "actions/setup-python@v5" with: python-version: "${{ matrix.config.python-version }}" @@ -71,8 +70,9 @@ jobs: run: python -m tox -e "${{ matrix.config.testenvs }}" -s false - name: "Upload Coverage 🚀" - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: ${{ always() && steps.setup-python.outcome == 'success' }} with: name: "coverage-${{ matrix.config.python-version }}" path: .coverage + include-hidden-files: true diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 82c1cd2..857b362 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,7 +8,7 @@ ci: repos: - repo: https://github.com/repo-helper/pyproject-parser - rev: v0.9.0 + rev: v0.13.0 hooks: - id: reformat-pyproject @@ -42,14 +42,14 @@ repos: exclude: ^(doc-source/conf|__pkginfo__|setup|tests/.*)\.py$ - id: bind-requirements - - repo: https://github.com/domdfcoding/flake8-dunder-all - rev: v0.3.0 + - repo: https://github.com/python-formate/flake8-dunder-all + rev: v0.4.1 hooks: - id: ensure-dunder-all files: ^snippet_fmt/.*\.py$ - repo: https://github.com/domdfcoding/flake2lint - rev: v0.4.2 + rev: v0.4.3 hooks: - id: flake2lint @@ -76,18 +76,18 @@ repos: - id: forbid-crlf - repo: https://github.com/python-formate/snippet-fmt - rev: v0.1.4 + rev: v0.1.5 hooks: - id: snippet-fmt - repo: https://github.com/python-formate/formate - rev: v0.5.0 + rev: v0.8.0 hooks: - id: formate exclude: ^(doc-source/conf|__pkginfo__|setup)\.(_)?py$ - - repo: https://github.com/domdfcoding/dep_checker - rev: v0.7.1 + - repo: https://github.com/python-coincidence/dep_checker + rev: v0.8.0 hooks: - id: dep_checker args: diff --git a/.readthedocs.yml b/.readthedocs.yml index 4a2ec5f..83fc025 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -13,9 +13,12 @@ python: - requirements: requirements.txt - requirements: doc-source/requirements.txt build: - os: ubuntu-20.04 + os: ubuntu-22.04 tools: python: '3.9' jobs: post_create_environment: - pip install . + post_install: + - pip install sphinxcontrib-applehelp==1.0.4 sphinxcontrib-devhelp==1.0.2 sphinxcontrib-htmlhelp==2.0.1 + sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 diff --git a/README.rst b/README.rst index 57ca7c8..b3dc9cf 100644 --- a/README.rst +++ b/README.rst @@ -99,7 +99,7 @@ snippet-fmt :target: https://github.com/python-formate/snippet-fmt/commit/master :alt: GitHub last commit -.. |maintained| image:: https://img.shields.io/maintenance/yes/2023 +.. |maintained| image:: https://img.shields.io/maintenance/yes/2025 :alt: Maintenance .. |pypi-downloads| image:: https://img.shields.io/pypi/dm/snippet-fmt diff --git a/doc-source/conf.py b/doc-source/conf.py index 57852a5..4180de1 100644 --- a/doc-source/conf.py +++ b/doc-source/conf.py @@ -71,11 +71,32 @@ } +# Fix for pathlib issue with sphinxemoji on Python 3.9 and Sphinx 4.x +def copy_asset_files(app, exc): + # 3rd party + from domdf_python_tools.compat import importlib_resources + from sphinx.util.fileutil import copy_asset + + if exc: + return + + asset_files = ["twemoji.js", "twemoji.css"] + for path in asset_files: + path_str = os.fspath(importlib_resources.files("sphinxemoji") / path) + copy_asset(path_str, os.path.join(app.outdir, "_static")) + + def setup(app): # 3rd party from sphinx_toolbox.latex import better_header_layout + from sphinxemoji import sphinxemoji app.connect("config-inited", lambda app, config: better_header_layout(config)) + app.connect("build-finished", copy_asset_files) + app.add_js_file("https://unpkg.com/twemoji@latest/dist/twemoji.min.js") + app.add_js_file("twemoji.js") + app.add_css_file("twemoji.css") + app.add_transform(sphinxemoji.EmojiSubstitutions) nitpicky = True diff --git a/doc-source/index.rst b/doc-source/index.rst index 686e48c..87a2f15 100644 --- a/doc-source/index.rst +++ b/doc-source/index.rst @@ -104,7 +104,7 @@ snippet-fmt :last-commit: :alt: GitHub last commit - .. |maintained| maintained-shield:: 2023 + .. |maintained| maintained-shield:: 2025 :alt: Maintenance .. |pypi-downloads| pypi-shield:: diff --git a/doc-source/requirements.txt b/doc-source/requirements.txt index e76c14d..947ae5c 100644 --- a/doc-source/requirements.txt +++ b/doc-source/requirements.txt @@ -2,7 +2,7 @@ git+https://github.com/domdfcoding/sphinx-click.git git+https://github.com/sphinx-toolbox/sphinx-toolbox-experimental.git default-values>=0.6.0 extras-require>=0.5.0 -furo>=2020.11.19b18 +furo==2021.06.18b36 html-section>=0.3.0 seed-intersphinx-mapping>=1.2.2 sphinx>=3.0.3 @@ -12,9 +12,13 @@ sphinx-favicon>=0.2 sphinx-licenseinfo>=0.3.1 sphinx-notfound-page>=0.7.1 sphinx-packaging>=0.1.0 -sphinx-prompt>=1.1.0 sphinx-pyproject>=0.1.0 -sphinx-tabs>=1.1.13 sphinx-toolbox>=3.5.0 +sphinxcontrib-applehelp==1.0.4 +sphinxcontrib-devhelp==1.0.2 +sphinxcontrib-htmlhelp==2.0.1 +sphinxcontrib-jsmath==1.0.1 +sphinxcontrib-qthelp==1.0.3 +sphinxcontrib-serializinghtml==1.1.5 sphinxemoji>=0.1.6 toctree-plus>=0.6.1 diff --git a/formate.toml b/formate.toml index ea929a4..f7412f2 100644 --- a/formate.toml +++ b/formate.toml @@ -6,21 +6,17 @@ noqa-reformat = 60 ellipsis-reformat = 70 squish_stubs = 80 -[config] -indent = "\t" -line_length = 115 - [hooks.yapf] priority = 30 -[hooks.isort] -priority = 50 - [hooks.yapf.kwargs] yapf_style = ".style.yapf" +[hooks.isort] +priority = 50 + [hooks.isort.kwargs] -indent = "\t\t" +indent = " " multi_line_output = 8 import_heading_stdlib = "stdlib" import_heading_thirdparty = "3rd party" @@ -48,4 +44,8 @@ known_third_party = [ "pytest_timeout", "typing_extensions", ] -known_first_party = "snippet_fmt" +known_first_party = [ "snippet_fmt",] + +[config] +indent = " " +line_length = 115 diff --git a/pyproject.toml b/pyproject.toml index 7a70bbf..90d9d54 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,14 +10,13 @@ readme = "README.rst" keywords = [ "docs", "formatting", "linting",] dynamic = [ "requires-python", "classifiers", "dependencies",] +[project.license] +file = "LICENSE" + [[project.authors]] name = "Dominic Davis-Foster" email = "dominic@davis-foster.co.uk" - -[project.license] -file = "LICENSE" - [project.urls] Homepage = "https://github.com/python-formate/snippet-fmt" "Issue Tracker" = "https://github.com/python-formate/snippet-fmt/issues" @@ -34,7 +33,7 @@ base-classifiers = [ "Intended Audience :: Developers", "Typing :: Typed", ] -python-versions = [ "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12",] +python-versions = [ "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13",] python-implementations = [ "CPython",] platforms = [ "Windows", "macOS", "Linux",] license-key = "MIT" @@ -61,7 +60,6 @@ extensions = [ "sphinx.ext.mathjax", "sphinxcontrib.extras_require", "sphinx.ext.todo", - "sphinxemoji.sphinxemoji", "notfound.extension", "sphinx_copybutton", "sphinxcontrib.default_values", @@ -77,7 +75,6 @@ extensions = [ "sphinx_toolbox_experimental.missing_xref", "sphinx_packaging", ] -sphinxemoji_style = "twemoji" gitstamp_fmt = "%d %b %Y" templates_path = [ "_templates",] html_static_path = [ "_static",] @@ -137,17 +134,6 @@ show_error_codes = true [tool.snippet-fmt] directives = [ "code-block",] -[tool.dependency-dash."requirements.txt"] -order = 10 - -[tool.dependency-dash."tests/requirements.txt"] -order = 20 -include = false - -[tool.dependency-dash."doc-source/requirements.txt"] -order = 30 -include = false - [tool.snippet-fmt.languages.toml] reformat = true @@ -160,3 +146,14 @@ reformat = true [tool.snippet-fmt.languages.ini] [tool.snippet-fmt.languages.json] + +[tool.dependency-dash."requirements.txt"] +order = 10 + +[tool.dependency-dash."tests/requirements.txt"] +order = 20 +include = false + +[tool.dependency-dash."doc-source/requirements.txt"] +order = 30 +include = false diff --git a/repo_helper.yml b/repo_helper.yml index 839fc1f..881c254 100644 --- a/repo_helper.yml +++ b/repo_helper.yml @@ -17,14 +17,13 @@ sphinx_html_theme: furo docs_fail_on_warning: true python_versions: - - '3.6' - '3.7' - '3.8' - '3.9' - "3.10" - "3.11" - "3.12" - - 3.13-dev + - "3.13" keywords: - formatting diff --git a/requirements.txt b/requirements.txt index c2c7180..c283f6a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ click>=8.0.1 consolekit>=1.2.3 -dom-toml>=0.5.0 +dom-toml>=2.0.0 domdf-python-tools>=3.0.0 entrypoints>=0.3 formate>=0.4.9 diff --git a/tests/test_snippet_fmt.py b/tests/test_snippet_fmt.py index c4ff36c..e844883 100644 --- a/tests/test_snippet_fmt.py +++ b/tests/test_snippet_fmt.py @@ -7,6 +7,7 @@ from _pytest.capture import CaptureResult from coincidence import AdvancedDataRegressionFixture, AdvancedFileRegressionFixture from coincidence.params import param +from coincidence.selectors import max_version, min_version from consolekit.terminal_colours import strip_ansi from consolekit.testing import CliRunner, Result from domdf_python_tools.paths import PathPlus, TemporaryPathPlus, in_directory @@ -52,15 +53,33 @@ {"ini": {"reformat": True}, "python": {"reformat": False}}, id="ini_python_false", ), - pytest.param({"JSON": {"reformat": True}}, id="json_caps"), - pytest.param({"json": {"reformat": True}}, id="json"), + pytest.param({"JSON": {"reformat": True}}, id="json_caps", marks=max_version("3.12")), + pytest.param( + {"JSON": {"reformat": True}}, + id="json_caps_new_error_msg", + marks=min_version("3.13"), + ), + pytest.param({"json": {"reformat": True}}, id="json", marks=max_version("3.12")), + pytest.param({"json": {"reformat": True}}, id="json_new_error_msg", marks=min_version("3.13")), pytest.param( {"JSON": {"reformat": True, "indent": 2}, "json": {"reformat": True}}, id="json_caps_indent", + marks=max_version("3.12"), + ), + pytest.param( + {"JSON": {"reformat": True, "indent": 2}, "json": {"reformat": True}}, + id="json_caps_indent_new_error_msg", + marks=min_version("3.13"), ), pytest.param( {"json": {"reformat": True, "indent": 2}, "JSON": {"reformat": True}}, id="json_indent", + marks=max_version("3.12"), + ), + pytest.param( + {"json": {"reformat": True, "indent": 2}, "JSON": {"reformat": True}}, + id="json_indent_new_error_msg", + marks=min_version("3.13"), ), ] ) diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_0_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_0_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_0_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_0_.yml new file mode 100644 index 0000000..c8c826f --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_0_.yml @@ -0,0 +1,6 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_1_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_1_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_1_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_1_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_1_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_1_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_2_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_2_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_2_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_2_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_2_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_2_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_3_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_3_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_3_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_3_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_3_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_3_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_4_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_4_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_4_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_4_.yml new file mode 100644 index 0000000..c8c826f --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_4_.yml @@ -0,0 +1,6 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_5_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_5_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_5_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_5_.yml new file mode 100644 index 0000000..c8c826f --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_5_.yml @@ -0,0 +1,6 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_6_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_6_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_6_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_6_.yml new file mode 100644 index 0000000..c8c826f --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_6_.yml @@ -0,0 +1,6 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_7_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_7_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_7_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_7_.yml new file mode 100644 index 0000000..c8c826f --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_7_.yml @@ -0,0 +1,6 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_0_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_0_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_0_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_0_.yml new file mode 100644 index 0000000..c8c826f --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_0_.yml @@ -0,0 +1,6 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_1_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_1_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_1_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_1_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_1_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_1_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_2_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_2_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_2_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_2_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_2_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_2_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_3_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_3_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_3_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_3_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_3_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_3_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_4_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_4_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_4_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_4_.yml new file mode 100644 index 0000000..c8c826f --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_4_.yml @@ -0,0 +1,6 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_5_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_5_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_5_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_5_.yml new file mode 100644 index 0000000..c8c826f --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_5_.yml @@ -0,0 +1,6 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_6_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_6_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_6_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_6_.yml new file mode 100644 index 0000000..c8c826f --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_6_.yml @@ -0,0 +1,6 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_7_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_7_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_7_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_7_.yml new file mode 100644 index 0000000..c8c826f --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_7_.yml @@ -0,0 +1,6 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_0_.rst new file mode 100644 index 0000000..5ebbed8 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_0_.rst @@ -0,0 +1,149 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + { + "key": "value", + "key2": "value2" + } + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + { + "key": "value", + "key2": "value2" + } + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_0_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_0_.yml new file mode 100644 index 0000000..742b675 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_0_.yml @@ -0,0 +1,32 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- "--- .../example.rst\t(original)" +- "+++ .../example.rst\t(reformatted)" +- '@@ -118,7 +118,10 @@' +- '' +- ' .. code-block:: json' +- '' +- "-\t{\"key\": \"value\", \"key2\": \"value2\"}" +- "+\t{" +- "+\t \"key\": \"value\"," +- "+\t \"key2\": \"value2\"" +- "+\t}" +- '' +- '' +- ' .. code-block:: bash' +- '@@ -135,7 +138,10 @@' +- '' +- " \t.. code-block:: json" +- '' +- "-\t\t{\"key\": \"value\", \"key2\": \"value2\"}" +- "+\t\t{" +- "+\t\t \"key\": \"value\"," +- "+\t\t \"key2\": \"value2\"" +- "+\t\t}" +- '' +- " \t.. code-block:: bash" +- '' +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_1_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_1_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_1_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_1_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_1_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_1_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_2_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_2_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_2_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_2_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_2_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_2_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_3_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_3_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_3_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_3_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_3_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_3_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_4_.rst new file mode 100644 index 0000000..5ebbed8 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_4_.rst @@ -0,0 +1,149 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + { + "key": "value", + "key2": "value2" + } + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + { + "key": "value", + "key2": "value2" + } + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_4_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_4_.yml new file mode 100644 index 0000000..742b675 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_4_.yml @@ -0,0 +1,32 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- "--- .../example.rst\t(original)" +- "+++ .../example.rst\t(reformatted)" +- '@@ -118,7 +118,10 @@' +- '' +- ' .. code-block:: json' +- '' +- "-\t{\"key\": \"value\", \"key2\": \"value2\"}" +- "+\t{" +- "+\t \"key\": \"value\"," +- "+\t \"key2\": \"value2\"" +- "+\t}" +- '' +- '' +- ' .. code-block:: bash' +- '@@ -135,7 +138,10 @@' +- '' +- " \t.. code-block:: json" +- '' +- "-\t\t{\"key\": \"value\", \"key2\": \"value2\"}" +- "+\t\t{" +- "+\t\t \"key\": \"value\"," +- "+\t\t \"key2\": \"value2\"" +- "+\t\t}" +- '' +- " \t.. code-block:: bash" +- '' +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_5_.rst new file mode 100644 index 0000000..5ebbed8 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_5_.rst @@ -0,0 +1,149 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + { + "key": "value", + "key2": "value2" + } + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + { + "key": "value", + "key2": "value2" + } + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_5_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_5_.yml new file mode 100644 index 0000000..742b675 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_5_.yml @@ -0,0 +1,32 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- "--- .../example.rst\t(original)" +- "+++ .../example.rst\t(reformatted)" +- '@@ -118,7 +118,10 @@' +- '' +- ' .. code-block:: json' +- '' +- "-\t{\"key\": \"value\", \"key2\": \"value2\"}" +- "+\t{" +- "+\t \"key\": \"value\"," +- "+\t \"key2\": \"value2\"" +- "+\t}" +- '' +- '' +- ' .. code-block:: bash' +- '@@ -135,7 +138,10 @@' +- '' +- " \t.. code-block:: json" +- '' +- "-\t\t{\"key\": \"value\", \"key2\": \"value2\"}" +- "+\t\t{" +- "+\t\t \"key\": \"value\"," +- "+\t\t \"key2\": \"value2\"" +- "+\t\t}" +- '' +- " \t.. code-block:: bash" +- '' +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_6_.rst new file mode 100644 index 0000000..5ebbed8 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_6_.rst @@ -0,0 +1,149 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + { + "key": "value", + "key2": "value2" + } + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + { + "key": "value", + "key2": "value2" + } + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_6_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_6_.yml new file mode 100644 index 0000000..742b675 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_6_.yml @@ -0,0 +1,32 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- "--- .../example.rst\t(original)" +- "+++ .../example.rst\t(reformatted)" +- '@@ -118,7 +118,10 @@' +- '' +- ' .. code-block:: json' +- '' +- "-\t{\"key\": \"value\", \"key2\": \"value2\"}" +- "+\t{" +- "+\t \"key\": \"value\"," +- "+\t \"key2\": \"value2\"" +- "+\t}" +- '' +- '' +- ' .. code-block:: bash' +- '@@ -135,7 +138,10 @@' +- '' +- " \t.. code-block:: json" +- '' +- "-\t\t{\"key\": \"value\", \"key2\": \"value2\"}" +- "+\t\t{" +- "+\t\t \"key\": \"value\"," +- "+\t\t \"key2\": \"value2\"" +- "+\t\t}" +- '' +- " \t.. code-block:: bash" +- '' +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_7_.rst new file mode 100644 index 0000000..5ebbed8 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_7_.rst @@ -0,0 +1,149 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + { + "key": "value", + "key2": "value2" + } + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + { + "key": "value", + "key2": "value2" + } + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_7_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_7_.yml new file mode 100644 index 0000000..742b675 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_7_.yml @@ -0,0 +1,32 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- "--- .../example.rst\t(original)" +- "+++ .../example.rst\t(reformatted)" +- '@@ -118,7 +118,10 @@' +- '' +- ' .. code-block:: json' +- '' +- "-\t{\"key\": \"value\", \"key2\": \"value2\"}" +- "+\t{" +- "+\t \"key\": \"value\"," +- "+\t \"key2\": \"value2\"" +- "+\t}" +- '' +- '' +- ' .. code-block:: bash' +- '@@ -135,7 +138,10 @@' +- '' +- " \t.. code-block:: json" +- '' +- "-\t\t{\"key\": \"value\", \"key2\": \"value2\"}" +- "+\t\t{" +- "+\t\t \"key\": \"value\"," +- "+\t\t \"key2\": \"value2\"" +- "+\t\t}" +- '' +- " \t.. code-block:: bash" +- '' +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_0_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_0_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_0_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_0_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_0_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_1_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_1_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_1_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_1_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_1_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_1_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_2_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_2_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_2_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_2_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_2_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_2_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_3_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_3_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_3_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_3_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_3_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_3_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_4_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_4_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_4_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_4_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_4_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_5_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_5_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_5_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_5_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_5_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_6_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_6_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_6_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_6_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_6_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_7_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_7_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_7_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_7_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_7_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_3_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_3_.yml index 7c2bc50..f5719f3 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_3_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_3_.yml @@ -1,6 +1,5 @@ err: -- '.../example.rst:106: TomlDecodeError: Unbalanced quotes (line 2 column 19 char - 28)' +- '.../example.rst:106: TOMLDecodeError: Expected "''" (at end of document)' - '' out: - '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_6_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_6_.yml index d280688..d7c6905 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_6_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_6_.yml @@ -1,6 +1,5 @@ err: -- '.../example.rst:106: TomlDecodeError: Unbalanced quotes (line 2 column 19 char - 28)' +- '.../example.rst:106: TOMLDecodeError: Expected "''" (at end of document)' - '' out: - "--- .../example.rst\t(original)" diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_0_.rst index 25e85f2..c1474bc 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_0_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_0_.rst @@ -71,9 +71,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code-block:: TOML diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_0_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_0_.yml index 81a7cc4..e00db4e 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_0_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_0_.yml @@ -3,21 +3,20 @@ err: out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -69,13 +69,11 @@' +- '@@ -69,13 +69,9 @@' - ' .. code-block:: toml' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code-block:: TOML' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_3_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_3_.yml index 7c2bc50..f5719f3 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_3_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_3_.yml @@ -1,6 +1,5 @@ err: -- '.../example.rst:106: TomlDecodeError: Unbalanced quotes (line 2 column 19 char - 28)' +- '.../example.rst:106: TOMLDecodeError: Expected "''" (at end of document)' - '' out: - '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_4_.rst index 25e85f2..c1474bc 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_4_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_4_.rst @@ -71,9 +71,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code-block:: TOML diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_4_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_4_.yml index 81a7cc4..e00db4e 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_4_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_4_.yml @@ -3,21 +3,20 @@ err: out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -69,13 +69,11 @@' +- '@@ -69,13 +69,9 @@' - ' .. code-block:: toml' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code-block:: TOML' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_5_.rst index 25e85f2..c1474bc 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_5_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_5_.rst @@ -71,9 +71,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code-block:: TOML diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_5_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_5_.yml index 81a7cc4..e00db4e 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_5_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_5_.yml @@ -3,21 +3,20 @@ err: out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -69,13 +69,11 @@' +- '@@ -69,13 +69,9 @@' - ' .. code-block:: toml' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code-block:: TOML' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_6_.rst index 25e85f2..c1474bc 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_6_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_6_.rst @@ -71,9 +71,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code-block:: TOML diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_6_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_6_.yml index 2557166..0c6281d 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_6_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_6_.yml @@ -1,25 +1,23 @@ err: -- '.../example.rst:106: TomlDecodeError: Unbalanced quotes (line 2 column 19 char - 28)' +- '.../example.rst:106: TOMLDecodeError: Expected "''" (at end of document)' - '' out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -69,13 +69,11 @@' +- '@@ -69,13 +69,9 @@' - ' .. code-block:: toml' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code-block:: TOML' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_7_.rst index 25e85f2..c1474bc 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_7_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_7_.rst @@ -71,9 +71,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code-block:: TOML diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_7_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_7_.yml index 81a7cc4..e00db4e 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_7_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_7_.yml @@ -3,21 +3,20 @@ err: out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -69,13 +69,11 @@' +- '@@ -69,13 +69,9 @@' - ' .. code-block:: toml' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code-block:: TOML' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_0_.rst index bbc4ea4..aec9526 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_0_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_0_.rst @@ -83,9 +83,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code:: TOML diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_0_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_0_.yml index 2f8e848..4407458 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_0_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_0_.yml @@ -3,21 +3,20 @@ err: out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -81,13 +81,11 @@' +- '@@ -81,13 +81,9 @@' - ' .. code-block:: TOML' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code:: TOML' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_1_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_1_.yml index 3533983..42fb6b7 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_1_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_1_.yml @@ -1,6 +1,6 @@ err: -- '.../example.rst:93: TomlDecodeError: Key name found without value. Reached end - of line. (line 10 column 2 char 86)' +- '.../example.rst:93: TOMLDecodeError: Invalid initial character for a key part (at + line 8, column 12)' - '' out: - '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_4_.rst index bbc4ea4..aec9526 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_4_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_4_.rst @@ -83,9 +83,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code:: TOML diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_4_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_4_.yml index 3cce36a..9dc4395 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_4_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_4_.yml @@ -1,25 +1,24 @@ err: -- '.../example.rst:93: TomlDecodeError: Key name found without value. Reached end - of line. (line 10 column 2 char 86)' +- '.../example.rst:93: TOMLDecodeError: Invalid initial character for a key part (at + line 8, column 12)' - '' out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -81,13 +81,11 @@' +- '@@ -81,13 +81,9 @@' - ' .. code-block:: TOML' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code:: TOML' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_5_.rst index bbc4ea4..aec9526 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_5_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_5_.rst @@ -83,9 +83,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code:: TOML diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_5_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_5_.yml index 3cce36a..9dc4395 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_5_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_5_.yml @@ -1,25 +1,24 @@ err: -- '.../example.rst:93: TomlDecodeError: Key name found without value. Reached end - of line. (line 10 column 2 char 86)' +- '.../example.rst:93: TOMLDecodeError: Invalid initial character for a key part (at + line 8, column 12)' - '' out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -81,13 +81,11 @@' +- '@@ -81,13 +81,9 @@' - ' .. code-block:: TOML' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code:: TOML' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_6_.rst index bbc4ea4..aec9526 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_6_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_6_.rst @@ -83,9 +83,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code:: TOML diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_6_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_6_.yml index 3cce36a..9dc4395 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_6_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_6_.yml @@ -1,25 +1,24 @@ err: -- '.../example.rst:93: TomlDecodeError: Key name found without value. Reached end - of line. (line 10 column 2 char 86)' +- '.../example.rst:93: TOMLDecodeError: Invalid initial character for a key part (at + line 8, column 12)' - '' out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -81,13 +81,11 @@' +- '@@ -81,13 +81,9 @@' - ' .. code-block:: TOML' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code:: TOML' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_7_.rst index bbc4ea4..aec9526 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_7_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_7_.rst @@ -83,9 +83,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code:: TOML diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_7_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_7_.yml index 3cce36a..9dc4395 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_7_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_7_.yml @@ -1,25 +1,24 @@ err: -- '.../example.rst:93: TomlDecodeError: Key name found without value. Reached end - of line. (line 10 column 2 char 86)' +- '.../example.rst:93: TOMLDecodeError: Invalid initial character for a key part (at + line 8, column 12)' - '' out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -81,13 +81,11 @@' +- '@@ -81,13 +81,9 @@' - ' .. code-block:: TOML' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code:: TOML' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_0_.rst index 25e85f2..c1474bc 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_0_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_0_.rst @@ -71,9 +71,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code-block:: TOML diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_0_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_0_.yml index 81a7cc4..e00db4e 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_0_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_0_.yml @@ -3,21 +3,20 @@ err: out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -69,13 +69,11 @@' +- '@@ -69,13 +69,9 @@' - ' .. code-block:: toml' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code-block:: TOML' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_3_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_3_.yml index 7c2bc50..f5719f3 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_3_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_3_.yml @@ -1,6 +1,5 @@ err: -- '.../example.rst:106: TomlDecodeError: Unbalanced quotes (line 2 column 19 char - 28)' +- '.../example.rst:106: TOMLDecodeError: Expected "''" (at end of document)' - '' out: - '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_4_.rst index 25e85f2..c1474bc 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_4_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_4_.rst @@ -71,9 +71,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code-block:: TOML diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_4_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_4_.yml index 81a7cc4..e00db4e 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_4_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_4_.yml @@ -3,21 +3,20 @@ err: out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -69,13 +69,11 @@' +- '@@ -69,13 +69,9 @@' - ' .. code-block:: toml' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code-block:: TOML' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_5_.rst index 25e85f2..c1474bc 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_5_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_5_.rst @@ -71,9 +71,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code-block:: TOML diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_5_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_5_.yml index 81a7cc4..e00db4e 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_5_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_5_.yml @@ -3,21 +3,20 @@ err: out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -69,13 +69,11 @@' +- '@@ -69,13 +69,9 @@' - ' .. code-block:: toml' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code-block:: TOML' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_6_.rst index 25e85f2..c1474bc 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_6_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_6_.rst @@ -71,9 +71,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code-block:: TOML diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_6_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_6_.yml index 2557166..0c6281d 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_6_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_6_.yml @@ -1,25 +1,23 @@ err: -- '.../example.rst:106: TomlDecodeError: Unbalanced quotes (line 2 column 19 char - 28)' +- '.../example.rst:106: TOMLDecodeError: Expected "''" (at end of document)' - '' out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -69,13 +69,11 @@' +- '@@ -69,13 +69,9 @@' - ' .. code-block:: toml' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code-block:: TOML' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_7_.rst index 25e85f2..c1474bc 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_7_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_7_.rst @@ -71,9 +71,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code-block:: TOML diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_7_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_7_.yml index 81a7cc4..e00db4e 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_7_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_7_.yml @@ -3,21 +3,20 @@ err: out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -69,13 +69,11 @@' +- '@@ -69,13 +69,9 @@' - ' .. code-block:: toml' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code-block:: TOML' diff --git a/tox.ini b/tox.ini index 90482e2..810fe74 100644 --- a/tox.ini +++ b/tox.ini @@ -5,6 +5,7 @@ # * testenv # * testenv:.package # * testenv:py313-dev +# * testenv:py313 # * testenv:py312-dev # * testenv:py312 # * testenv:docs @@ -22,14 +23,13 @@ [tox] envlist = - py36-click{7,8} py37-click{7,8} py38-click{7,8} py39-click{7,8} py310-click{7,8} py311-click{7,8} py312-click{7,8} - py313-dev-click{7,8} + py313-click{7,8} mypy build skip_missing_interpreters = True @@ -42,14 +42,13 @@ requires = [envlists] test = - py36-click{7,8} py37-click{7,8} py38-click{7,8} py39-click{7,8} py310-click{7,8} py311-click{7,8} py312-click{7,8} - py313-dev-click{7,8} + py313-click{7,8} qa = mypy, lint cov = py38-click7, coverage @@ -71,12 +70,15 @@ setenv = PYTHONDEVMODE=1 PIP_DISABLE_PIP_VERSION_CHECK=1 -[testenv:py313-dev] +[testenv:py313] +download = True setenv = PYTHONDEVMODE=1 PIP_DISABLE_PIP_VERSION_CHECK=1 + UNSAFE_PYO3_SKIP_VERSION_CHECK=1 [testenv:py312] +download = True setenv = PYTHONDEVMODE=1 PIP_DISABLE_PIP_VERSION_CHECK=1 @@ -94,6 +96,7 @@ setenv = PYTHONDEVMODE=1 PIP_DISABLE_PIP_VERSION_CHECK=1 PIP_PREFER_BINARY=1 + UNSAFE_PYO3_SKIP_VERSION_CHECK=1 skip_install = True changedir = {toxinidir} deps = @@ -121,7 +124,7 @@ deps = flake8-github-actions>=0.1.0 flake8-noqa>=1.1.0,<=1.2.2 flake8-pyi>=20.10.0,<=22.8.0 - flake8-pytest-style>=1.3.0 + flake8-pytest-style>=1.3.0,<2 flake8-quotes>=3.3.0 flake8-slots>=0.1.0 flake8-sphinx-links>=0.0.4 @@ -199,7 +202,7 @@ inline-quotes = " multiline-quotes = """ docstring-quotes = """ count = True -min_python_version = 3.6.1 +min_python_version = 3.7 unused-arguments-ignore-abstract-functions = True unused-arguments-ignore-overload-functions = True unused-arguments-ignore-magic-methods = True @@ -216,8 +219,8 @@ exclude_lines = raise NotImplementedError if 0: if False: - if TYPE_CHECKING: - if typing.TYPE_CHECKING: + if TYPE_CHECKING + if typing.TYPE_CHECKING if __name__ == .__main__.: [check-wheel-contents] @@ -234,11 +237,14 @@ filterwarnings = ignore:lib2to3 package is deprecated and may not be able to parse Python 3.10+:PendingDeprecationWarning [testenv:py312-click{7,8}] +download = True setenv = PYTHONDEVMODE=1 PIP_DISABLE_PIP_VERSION_CHECK=1 -[testenv:py313-dev-click{7,8}] +[testenv:py313-click{7,8}] +download = True setenv = PYTHONDEVMODE=1 PIP_DISABLE_PIP_VERSION_CHECK=1 + UNSAFE_PYO3_SKIP_VERSION_CHECK=1