toml-sort-0.24.4
checks.aarch64-linux.treefmt
· build #21
· 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
37shrinking RPATHs of ELF executables and libraries in /nix/store/w44wik9bcx09rymks25miqgni37pymrw-toml-sort-0.24.4-dist38checking for references to /build/ in /nix/store/w44wik9bcx09rymks25miqgni37pymrw-toml-sort-0.24.4-dist...39patching script interpreter paths in /nix/store/w44wik9bcx09rymks25miqgni37pymrw-toml-sort-0.24.4-dist40shrinking RPATHs of ELF executables and libraries in /nix/store/j2zjfaa5q7gydcp1b3llp44acnw4w1fy-toml-sort-0.24.441checking for references to /build/ in /nix/store/j2zjfaa5q7gydcp1b3llp44acnw4w1fy-toml-sort-0.24.4...42patching script interpreter paths in /nix/store/j2zjfaa5q7gydcp1b3llp44acnw4w1fy-toml-sort-0.24.443stripping (with command strip and flags -S -p) in /nix/store/j2zjfaa5q7gydcp1b3llp44acnw4w1fy-toml-sort-0.24.4/lib /nix/store/j2zjfaa5q7gydcp1b3llp44acnw4w1fy-toml-sort-0.24.4/bin44Rewriting #!/nix/store/lq2fsnmg0q3y0vlxn91w8s8wvj1m6fld-python3-3.14.8/bin/python3.14 to #!/nix/store/lq2fsnmg0q3y0vlxn91w8s8wvj1m6fld-python3-3.14.845wrapping `/nix/store/j2zjfaa5q7gydcp1b3llp44acnw4w1fy-toml-sort-0.24.4/bin/toml-sort'...46Executing pythonRemoveTestsDir47Finished executing pythonRemoveTestsDirinstallCheckPhase
48no Makefile or custom installCheckPhase, doing nothingpythonImportsCheckPhase
49Executing pythonImportsCheckPhasepytestCheckPhase
50Executing pytestCheckPhase51pytest flags: -m pytest52============================= test session starts ==============================53platform linux -- Python 3.14.8, pytest-9.1.1, pluggy-1.6.054rootdir: /build/source55configfile: pyproject.toml56collected 50 items 5758tests/test_cli.py .x.................................. [ 72%]59tests/test_toml_sort.py .F.........x.. [100%]6061=================================== FAILURES ===================================62______ test_tomlsort[gradle-version-catalog-gradle-version-catalog-args0] ______6364get_fixture = <function get_fixture.<locals>.getter at 0x7ffff4f20f60>65unsorted_fixture = 'gradle-version-catalog'66sorted_fixture = 'gradle-version-catalog'67args = {'sort_config': SortConfiguration(tables=False, table_keys=True, inline_tables=False, inline_arrays=False, ignore_case=False, first=[])}6869 @pytest.mark.parametrize(70 "unsorted_fixture,sorted_fixture,args",71 [72 (73 "gradle-version-catalog",74 "gradle-version-catalog",75 {76 "sort_config": SortConfiguration(77 tables=False,78 ),79 },80 ),81 (82 "dotted-key",83 "dotted-key",84 {85 "sort_config": SortConfiguration(86 inline_arrays=True, inline_tables=True87 ),88 },89 ),90 (91 "inline",92 "inline",93 {94 "sort_config": SortConfiguration(95 inline_arrays=True, inline_tables=True96 ),97 },98 ),99 (100 "comment",101 "comment-comments-preserved",102 {"comment_config": CommentConfiguration(header=False, footer=False)},103 ),104 (105 "comment",106 "comment-no-comments",107 {108 "comment_config": CommentConfiguration(109 header=False,110 footer=False,111 block=False,112 inline=False,113 )114 },115 ),116 (117 "comment",118 "comment-header-footer",119 {120 "sort_config": SortConfiguration(table_keys=False),121 "format_config": FormattingConfiguration(122 spaces_before_inline_comment=1123 ),124 },125 ),126 (127 "from-toml-lang",128 "from-toml-lang",129 {130 "sort_config": SortConfiguration(table_keys=False),131 "format_config": FormattingConfiguration(132 spaces_before_inline_comment=1133 ),134 },135 ),136 (137 "from-toml-lang",138 "from-toml-lang-overrides",139 {140 "sort_config": SortConfiguration(141 inline_arrays=True, inline_tables=True142 ),143 "format_config": FormattingConfiguration(144 spaces_before_inline_comment=1145 ),146 "sort_config_overrides": {147 "servers.beta": SortOverrideConfiguration(table_keys=False),148 "clients.data": SortOverrideConfiguration(inline_arrays=False),149 },150 },151 ),152 (153 "from-toml-lang",154 "from-toml-lang-first",155 {156 "sort_config": SortConfiguration(157 inline_arrays=True,158 inline_tables=True,159 first=["servers", "products"],160 ),161 "format_config": FormattingConfiguration(162 spaces_before_inline_comment=1163 ),164 "sort_config_overrides": {165 "database": SortOverrideConfiguration(first=["ports"]),166 "owner": SortOverrideConfiguration(first=["name", "dob"]),167 "inline.c": SortOverrideConfiguration(first=["version"]),168 },169 },170 ),171 (172 "pyproject-weird-order",173 "pyproject-weird-order",174 {175 "sort_config": SortConfiguration(table_keys=False),176 "comment_config": CommentConfiguration(block=False),177 "format_config": FormattingConfiguration(178 spaces_before_inline_comment=1179 ),180 },181 ),182 pytest.param(183 "weird",184 "weird",185 {186 "sort_config": SortConfiguration(table_keys=False),187 "comment_config": CommentConfiguration(188 block=False,189 ),190 "format_config": FormattingConfiguration(191 spaces_before_inline_comment=1192 ),193 },194 marks=[pytest.mark.xfail],195 ),196 pytest.param(197 "single-comment",198 "../single-comment", # Input is the same as the output199 {},200 ),201 pytest.param(202 "empty",203 "empty",204 {},205 ),206 ],207 )208 def test_tomlsort(209 get_fixture: Callable[[str | List[str]], Path],210 unsorted_fixture: str,211 sorted_fixture: str,212 args: Dict[str, Any],213 ) -> None:214 """Output of TomlSort.sorted() function matches expected."""215 path_unsorted = get_fixture(unsorted_fixture)216 path_sorted = get_fixture(["sorted", sorted_fixture])217 218 toml_unsorted_fixture = path_unsorted.read_text()219 toml_sorted_fixture = path_sorted.read_text()220 221> sort_output = TomlSort(toml_unsorted_fixture, **args).sorted()222 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^223224tests/test_toml_sort.py:177: 225_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 226toml_sort/tomlsort.py:782: in sorted227 sorted_toml = self.toml_doc_sorted(toml_doc)228 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^229toml_sort/tomlsort.py:768: in toml_doc_sorted230 self.toml_elements_sorted(item, sorted_document),231 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^232toml_sort/tomlsort.py:576: in toml_elements_sorted233 for item in self.sorted_children_table(original.keys, original.children):234 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^235toml_sort/tomlsort.py:526: in sorted_children_table236 non_tables = self.sort_items(237toml_sort/tomlsort.py:493: in sort_items238 item.value = self.sort_item(item.keys, item.value)239 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^240toml_sort/tomlsort.py:419: in sort_item241 return self.sort_inline_table(keys, item, indent_depth=indent_depth)242 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^243toml_sort/tomlsort.py:460: in sort_inline_table244 new_table.append(245/nix/store/bl76sy7jca4a9w8652qkgjlj51m15gm0-python3.14-tomlkit-0.15.1/lib/python3.14/site-packages/tomlkit/items.py:2033: in append246 self._validate_child(_item)247_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 248249self = {'module': 'com.example:foo'}, _item = {'ref': 'fooVersion'}250251 def _validate_child(self, _item: Item) -> None:252 if isinstance(_item, Table):253> raise ValueError("Inline tables cannot contain a table")254E ValueError: Inline tables cannot contain a table255256/nix/store/bl76sy7jca4a9w8652qkgjlj51m15gm0-python3.14-tomlkit-0.15.1/lib/python3.14/site-packages/tomlkit/items.py:2053: ValueError257=========================== short test summary info ============================258FAILED tests/test_toml_sort.py::test_tomlsort[gradle-version-catalog-gradle-version-catalog-args0] - ValueError: Inline tables cannot contain a table259=================== 1 failed, 47 passed, 2 xfailed in 1.69s ====================