toml-sort-0.24.4
checks.aarch64-darwin.treefmt
· build #22
· raw
1structuredAttrs is enabled2Sourcing python-remove-tests-dir-hook3Sourcing python-catch-conflicts-hook.sh4Sourcing python-remove-bin-bytecode-hook.sh5Sourcing pypa-build-hook6Using pypaBuildPhase7Sourcing python-runtime-deps-check-hook8Using pythonRuntimeDepsCheckHook9Sourcing pypa-install-hook10Using pypaInstallPhase11Sourcing python-imports-check-hook.sh12Using pythonImportsCheckPhase13Sourcing python-namespaces-hook14Sourcing python-catch-conflicts-hook.sh15Sourcing pytest-check-hook16Using pytestCheckPhase
unpackPhase
17unpacking source archive /nix/store/q0195y40sagkhxs4bfsalinkx3wv3yk7-source18source root is source19setting SOURCE_DATE_EPOCH to timestamp 315619200 of file "source/toml_sort/tomlsort.py"configurePhase
20no configure script, doing nothingbuildPhase
21Executing pypaBuildPhase22Creating a wheel...23pypa build flags: --no-isolation --outdir dist/ --wheel24* Getting build dependencies for wheel...25* Building wheel...26Successfully built toml_sort-0.24.4-py3-none-any.whl27Finished creating a wheel...28Finished executing pypaBuildPhasepythonRuntimeDepsCheckHook
29Executing pythonRuntimeDepsCheck30Checking runtime dependencies for toml_sort-0.24.4-py3-none-any.whl31Finished executing pythonRuntimeDepsCheckinstallPhase
32Executing pypaInstallPhase33Successfully installed toml_sort-0.24.4-py3-none-any.whl34Finished executing pypaInstallPhasepythonOutputDistPhase
35Executing pythonOutputDistPhase36Finished executing pythonOutputDistPhasefixupPhase
37checking for references to /nix/var/nix/builds/nix-26726-3445873280/ in /nix/store/c6vgy17prfd1g9qpmz0v9mb04acvxfh4-toml-sort-0.24.4-dist...38patching script interpreter paths in /nix/store/c6vgy17prfd1g9qpmz0v9mb04acvxfh4-toml-sort-0.24.4-dist39checking for references to /nix/var/nix/builds/nix-26726-3445873280/ in /nix/store/z3prcrbq9xz1rr5a5sxi7gcfsgm59v5j-toml-sort-0.24.4...40patching script interpreter paths in /nix/store/z3prcrbq9xz1rr5a5sxi7gcfsgm59v5j-toml-sort-0.24.441stripping (with command strip and flags -S) in /nix/store/z3prcrbq9xz1rr5a5sxi7gcfsgm59v5j-toml-sort-0.24.4/lib /nix/store/z3prcrbq9xz1rr5a5sxi7gcfsgm59v5j-toml-sort-0.24.4/bin42Rewriting #!/nix/store/0jb1qn7qnpbz8774mq5k2c1p84gp0x76-python3-3.14.8/bin/python3.14 to #!/nix/store/0jb1qn7qnpbz8774mq5k2c1p84gp0x76-python3-3.14.843wrapping `/nix/store/z3prcrbq9xz1rr5a5sxi7gcfsgm59v5j-toml-sort-0.24.4/bin/toml-sort'...44Executing pythonRemoveTestsDir45Finished executing pythonRemoveTestsDirinstallCheckPhase
46no Makefile or custom installCheckPhase, doing nothingpythonImportsCheckPhase
47Executing pythonImportsCheckPhasepytestCheckPhase
48Executing pytestCheckPhase49pytest flags: -m pytest50============================= test session starts ==============================51platform darwin -- Python 3.14.8, pytest-9.1.1, pluggy-1.6.052rootdir: /nix/var/nix/builds/nix-26726-3445873280/source53configfile: pyproject.toml54collected 50 items 5556tests/test_cli.py .x.................................. [ 72%]57tests/test_toml_sort.py .F.........x.. [100%]5859=================================== FAILURES ===================================60______ test_tomlsort[gradle-version-catalog-gradle-version-catalog-args0] ______6162get_fixture = <function get_fixture.<locals>.getter at 0x1061fefb0>63unsorted_fixture = 'gradle-version-catalog'64sorted_fixture = 'gradle-version-catalog'65args = {'sort_config': SortConfiguration(tables=False, table_keys=True, inline_tables=False, inline_arrays=False, ignore_case=False, first=[])}6667 @pytest.mark.parametrize(68 "unsorted_fixture,sorted_fixture,args",69 [70 (71 "gradle-version-catalog",72 "gradle-version-catalog",73 {74 "sort_config": SortConfiguration(75 tables=False,76 ),77 },78 ),79 (80 "dotted-key",81 "dotted-key",82 {83 "sort_config": SortConfiguration(84 inline_arrays=True, inline_tables=True85 ),86 },87 ),88 (89 "inline",90 "inline",91 {92 "sort_config": SortConfiguration(93 inline_arrays=True, inline_tables=True94 ),95 },96 ),97 (98 "comment",99 "comment-comments-preserved",100 {"comment_config": CommentConfiguration(header=False, footer=False)},101 ),102 (103 "comment",104 "comment-no-comments",105 {106 "comment_config": CommentConfiguration(107 header=False,108 footer=False,109 block=False,110 inline=False,111 )112 },113 ),114 (115 "comment",116 "comment-header-footer",117 {118 "sort_config": SortConfiguration(table_keys=False),119 "format_config": FormattingConfiguration(120 spaces_before_inline_comment=1121 ),122 },123 ),124 (125 "from-toml-lang",126 "from-toml-lang",127 {128 "sort_config": SortConfiguration(table_keys=False),129 "format_config": FormattingConfiguration(130 spaces_before_inline_comment=1131 ),132 },133 ),134 (135 "from-toml-lang",136 "from-toml-lang-overrides",137 {138 "sort_config": SortConfiguration(139 inline_arrays=True, inline_tables=True140 ),141 "format_config": FormattingConfiguration(142 spaces_before_inline_comment=1143 ),144 "sort_config_overrides": {145 "servers.beta": SortOverrideConfiguration(table_keys=False),146 "clients.data": SortOverrideConfiguration(inline_arrays=False),147 },148 },149 ),150 (151 "from-toml-lang",152 "from-toml-lang-first",153 {154 "sort_config": SortConfiguration(155 inline_arrays=True,156 inline_tables=True,157 first=["servers", "products"],158 ),159 "format_config": FormattingConfiguration(160 spaces_before_inline_comment=1161 ),162 "sort_config_overrides": {163 "database": SortOverrideConfiguration(first=["ports"]),164 "owner": SortOverrideConfiguration(first=["name", "dob"]),165 "inline.c": SortOverrideConfiguration(first=["version"]),166 },167 },168 ),169 (170 "pyproject-weird-order",171 "pyproject-weird-order",172 {173 "sort_config": SortConfiguration(table_keys=False),174 "comment_config": CommentConfiguration(block=False),175 "format_config": FormattingConfiguration(176 spaces_before_inline_comment=1177 ),178 },179 ),180 pytest.param(181 "weird",182 "weird",183 {184 "sort_config": SortConfiguration(table_keys=False),185 "comment_config": CommentConfiguration(186 block=False,187 ),188 "format_config": FormattingConfiguration(189 spaces_before_inline_comment=1190 ),191 },192 marks=[pytest.mark.xfail],193 ),194 pytest.param(195 "single-comment",196 "../single-comment", # Input is the same as the output197 {},198 ),199 pytest.param(200 "empty",201 "empty",202 {},203 ),204 ],205 )206 def test_tomlsort(207 get_fixture: Callable[[str | List[str]], Path],208 unsorted_fixture: str,209 sorted_fixture: str,210 args: Dict[str, Any],211 ) -> None:212 """Output of TomlSort.sorted() function matches expected."""213 path_unsorted = get_fixture(unsorted_fixture)214 path_sorted = get_fixture(["sorted", sorted_fixture])215 216 toml_unsorted_fixture = path_unsorted.read_text()217 toml_sorted_fixture = path_sorted.read_text()218 219> sort_output = TomlSort(toml_unsorted_fixture, **args).sorted()220 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^221222tests/test_toml_sort.py:177: 223_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 224toml_sort/tomlsort.py:782: in sorted225 sorted_toml = self.toml_doc_sorted(toml_doc)226 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^227toml_sort/tomlsort.py:768: in toml_doc_sorted228 self.toml_elements_sorted(item, sorted_document),229 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^230toml_sort/tomlsort.py:576: in toml_elements_sorted231 for item in self.sorted_children_table(original.keys, original.children):232 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^233toml_sort/tomlsort.py:526: in sorted_children_table234 non_tables = self.sort_items(235toml_sort/tomlsort.py:493: in sort_items236 item.value = self.sort_item(item.keys, item.value)237 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^238toml_sort/tomlsort.py:419: in sort_item239 return self.sort_inline_table(keys, item, indent_depth=indent_depth)240 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^241toml_sort/tomlsort.py:460: in sort_inline_table242 new_table.append(243/nix/store/pc8qyi0ibn8qnj2kzp5zh9wrv207rjbg-python3.14-tomlkit-0.15.1/lib/python3.14/site-packages/tomlkit/items.py:2033: in append244 self._validate_child(_item)245_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 246247self = {'module': 'com.example:foo'}, _item = {'ref': 'fooVersion'}248249 def _validate_child(self, _item: Item) -> None:250 if isinstance(_item, Table):251> raise ValueError("Inline tables cannot contain a table")252E ValueError: Inline tables cannot contain a table253254/nix/store/pc8qyi0ibn8qnj2kzp5zh9wrv207rjbg-python3.14-tomlkit-0.15.1/lib/python3.14/site-packages/tomlkit/items.py:2053: ValueError255=========================== short test summary info ============================256FAILED tests/test_toml_sort.py::test_tomlsort[gradle-version-catalog-gradle-version-catalog-args0] - ValueError: Inline tables cannot contain a table257=================== 1 failed, 47 passed, 2 xfailed in 1.33s ====================