MCPcopy Create free account

hub / github.com/PyCQA/isort / functions

Functions829 in github.com/PyCQA/isort

Functiontest_remove_imports
Ensures removing imports works as expected.
tests/unit/test_isort.py:933
Functiontest_reverse_relative_combined_with_force_sort_within_sections_issue_1395
Test to ensure reverse relative combines well with other common isort settings. See: https://github.com/pycqa/isort/issues/1395.
tests/unit/test_regressions.py:636
Functiontest_reverse_relative_imports_issue_417
()
tests/unit/test_isort.py:3846
Functiontest_reverse_sort_relative_in_force_sorted_sections_issue_1659
Ensure reverse ordered relative imports are sorted within sections
tests/unit/test_isort.py:3315
Functiontest_ruff_reference_example
Reproduce the canonical example from the ruff issue tracker. See https://github.com/astral-sh/ruff/issues/21305.
tests/unit/test_lazy_imports.py:60
Functiontest_safety_skips
(tmpdir, enabled: bool)
tests/unit/test_isort.py:3759
Functiontest_same_line_statements
Ensure isort correctly handles the case where a single line contains multiple statements including an import
tests/unit/test_isort.py:2097
Functiontest_sections_parsed_correct
Ensure that modules for custom sections parsed as list from config file and isort result is correct
tests/unit/test_isort.py:2643
Functiontest_semicolon_ignored_for_dynamic_lines_after_import_issue_1178
Test to ensure even if a semicolon is in the decorator in the line following an import the correct line spacing determination will be made. Se
tests/unit/test_ticketed_features.py:15
Functiontest_set_bracket_and_quotes
()
tests/unit/test_literal.py:45
Functiontest_settings_overwrite
Test to ensure settings overwrite instead of trying to combine.
tests/unit/test_isort.py:1776
Functiontest_settings_path_skip_issue_909
(tmpdir)
tests/unit/test_isort.py:4241
Functiontest_shouldnt_add_lines
Ensure that isort doesn't add a blank line when a top of import comment is present, See: issue #316
tests/unit/test_isort.py:2635
Functiontest_show_files
(capsys, tmpdir)
tests/unit/test_main.py:121
Functiontest_similar_to_std_library
Test to ensure modules that are named similarly to a standard library import don't end up clobbered
tests/unit/test_isort.py:1987
Functiontest_single_element_tuple_keeps_trailing_comma
()
tests/unit/test_literal.py:41
Functiontest_single_element_tuple_wraps_and_keeps_comma
()
tests/unit/test_literal.py:93
Functiontest_single_line_exclusions
()
tests/unit/test_isort.py:5090
Functiontest_single_multiline
Test the case where a single import spawns multiple lines.
tests/unit/test_isort.py:1608
Functiontest_skip
Ensure skipping a single import will work as expected.
tests/unit/test_isort.py:806
Functiontest_skip_glob
(tmpdir, skip_glob_assert: tuple[list[str], int, set[str]])
tests/unit/test_isort.py:3806
Functiontest_skip_paths_issue_938
(tmpdir)
tests/unit/test_isort.py:4271
Functiontest_skip_sort_reexports
()
tests/unit/test_action_comments.py:51
Functiontest_skip_with_file_name
Ensure skipping a file works even when file_contents is provided.
tests/unit/test_isort.py:826
Functiontest_skip_within_file
Ensure skipping a whole file works.
tests/unit/test_isort.py:835
Functiontest_smart_lines_after_import_section
Tests the default 'smart' behavior for dealing with lines after the import section
tests/unit/test_isort.py:1741
Functiontest_sort_code_string_mixed_newlines
()
tests/unit/test_api.py:88
Functiontest_sort_configurable_sort_issue_1732
Test support for pluggable isort sort functions.
tests/unit/test_ticketed_features.py:1019
Functiontest_sort_file
(benchmark, imperfect)
tests/benchmark/test_api.py:18
Functiontest_sort_file
(imperfect)
tests/unit/test_api.py:33
Functiontest_sort_file_in_place
(benchmark, imperfect)
tests/benchmark/test_api.py:26
Functiontest_sort_file_in_place
(imperfect)
tests/unit/test_api.py:38
Functiontest_sort_file_to_stdout
(capsys, imperfect)
tests/unit/test_api.py:43
Functiontest_sort_file_with_bad_syntax
(tmpdir)
tests/unit/test_api.py:24
Functiontest_sort_imports
(tmpdir)
tests/unit/test_main.py:44
Functiontest_sort_imports_error_handling
(tmpdir, capsys)
tests/unit/test_main.py:59
Functiontest_sort_on_number
Ensure numbers get sorted logically (10 > 9 not the other way around)
tests/unit/test_isort.py:163
Functiontest_sort_reexports_check_mode_multiline_all_issue_2280
``--check`` on a multi-line ``__all__`` with ``--sort-reexports`` must not crash. Check mode routes output to a null stream whose ``tell()`` is a
tests/unit/test_regressions.py:2254
Functiontest_sort_reexports_output_is_black_stable_issue_2280
isort's sorted __all__ under the black profile must be a fixpoint for both isort and black (running either again changes nothing). See issue #2280
tests/unit/test_regressions.py:2231
Functiontest_sort_reexports_respects_black_profile_issue_2280
``--sort-reexports`` must honor the active formatting config, not stdlib ``pprint``. ``isort.literal`` used to format the sorted ``__all__`` with
tests/unit/test_regressions.py:2176
Functiontest_sort_reexports_with_stdin_raises_error_issue_2393
Ensure --sort-reexports raises a clear error when used with stdin.
tests/unit/test_regressions.py:2072
Functiontest_sort_relative_in_force_sorted_sections_issue_1659
Ensure relative imports are sorted within sections
tests/unit/test_isort.py:3298
Functiontest_sort_separate_packages_issue_2104
Test to ensure that packages within a section can be separated by blank lines. See: https://github.com/PyCQA/isort/issues/2104
tests/unit/test_ticketed_features.py:1092
Functiontest_sort_within_section
Test to ensure its possible to force isort to sort within sections
tests/unit/test_isort.py:2721
Functiontest_sort_within_section_case_honored
Ensure isort can do partial case-sensitive sorting in force-sorted sections
tests/unit/test_isort.py:2771
Functiontest_sort_within_section_comments_issue_436
Test to ensure sort within sections leaves comments untouched
tests/unit/test_isort.py:3242
Functiontest_sort_within_sections_with_force_to_top_issue_473
Test to ensure it's possible to sort within sections with items forced to top
tests/unit/test_isort.py:3256
Functiontest_sorted_imports_multiple_configs
()
tests/unit/test_api.py:76
Functiontest_sorting_with_two_top_comments
Test to ensure isort will sort files that contain 2 top comments
tests/unit/test_isort.py:2826
Functiontest_split_on_trailing_comma
()
tests/unit/test_isort.py:5462
Functiontest_split_on_trailing_comma_idempotent_with_non_default_wrap_mode
Ensure isort output is idempotent when ``split_on_trailing_comma`` and ``include_trailing_comma`` are combined with a non-default ``multi_line_out
tests/unit/test_regressions.py:2080
Functiontest_split_on_trailing_comma_stable_with_mixed_as_imports_issue_2352
Regression test for https://github.com/PyCQA/isort/issues/2352. isort should produce stable output when a module has both aliased and non-aliased
tests/unit/test_isort.py:5490
Functiontest_split_on_trailing_comma_stable_with_use_parentheses_2352
Regression test for https://github.com/PyCQA/isort/issues/2352. isort should produce stable output when a module has both aliased and non-aliased
tests/unit/test_isort.py:5543
Functiontest_split_on_trailing_comma_wih_as
()
tests/unit/test_isort.py:5478
Functiontest_split_position
Ensure isort splits on import instead of . when possible
tests/unit/test_isort.py:2134
Methodtest_src_paths_are_combined_and_deduplicated
(self)
tests/unit/test_settings.py:89
Methodtest_src_paths_supports_glob_expansion
(self, tmp_path)
tests/unit/test_settings.py:94
Functiontest_standard_library_deprecates_user_issue_778
()
tests/unit/test_isort.py:4235
Functiontest_star_import_wrapped_end_to_end
New lines should be preserved at the end of too long start imports.
tests/unit/test_wrap.py:91
Functiontest_sticky_comments
Test to ensure it is possible to make comments 'stick' above imports
tests/unit/test_isort.py:2351
Functiontest_stream_skip_file
(tmpdir, capsys)
tests/unit/test_main.py:877
Functiontest_strict_whitespace_by_default
(capsys)
tests/unit/test_isort.py:3177
Functiontest_strict_whitespace_no_closing_newline_issue_676
(capsys)
tests/unit/test_isort.py:3185
Functiontest_sys_path_mutation
Test to ensure sys.path is not modified
tests/unit/test_isort.py:3024
Functiontest_tab_character_in_import
Ensure isort correctly handles import statements that contain a tab character
tests/unit/test_isort.py:2128
Functiontest_third_party_case_sensitive
Modules which match builtins by name but not on case should not be picked up on Windows.
tests/unit/test_isort.py:3000
Functiontest_thirdy_party_overrides_standard_section
Test to ensure changing the default section works as expected.
tests/unit/test_isort.py:1116
Functiontest_titled_and_footered_imports
Tests setting custom footers to import sections.
tests/unit/test_isort.py:1395
Functiontest_titled_imports
Tests setting custom titled/commented import sections.
tests/unit/test_isort.py:1254
Functiontest_to_ensure_correctly_handling_of_whitespace_only_issue_811
( ws: str, capsys: pytest.CaptureFixture[str], )
tests/unit/test_isort.py:4224
Functiontest_to_ensure_empty_line_not_added_to_file_start_issue_889
()
tests/unit/test_isort.py:4218
Functiontest_to_ensure_importing_from_imports_module_works_issue_662
()
tests/unit/test_isort.py:3599
Functiontest_to_ensure_imports_are_brought_to_top_issue_651
()
tests/unit/test_isort.py:3578
Functiontest_to_ensure_no_unexpected_changes_issue_666
()
tests/unit/test_isort.py:3611
Functiontest_to_ensure_tabs_dont_become_space_issue_665
()
tests/unit/test_isort.py:3630
Functiontest_top_comments
Ensure correct behavior with top comments
tests/unit/test_isort.py:2390
Functiontest_top_doc_string
()
tests/unit/test_identify.py:33
Functiontest_top_level_import_order
()
tests/unit/test_isort.py:5035
Functiontest_top_of_line_comments
Test to ensure top of line comments stay where they should: issue 260
tests/unit/test_isort.py:2612
Functiontest_top_only
()
tests/unit/test_identify.py:11
Functiontest_trailing_comma_doesnt_introduce_broken_code_with_comment_and_wrap_issue_1302
Tests to assert the combination of include_trailing_comma and a wrapped line doesn't break. See: https://github.com/pycqa/isort/issues/1302.
tests/unit/test_regressions.py:245
Functiontest_treating_comments_as_code_issue_1357
Test to ensure isort provides a way to treat comments as code. See: https://github.com/pycqa/isort/issues/1357
tests/unit/test_ticketed_features.py:242
Functiontest_trie
()
tests/unit/test_utils.py:4
Functiontest_unindented_comment_in_indented_block_issue_1899
Test that unindented comments before indented imports are not corrupted. See: https://github.com/PyCQA/isort/issues/1899
tests/unit/test_ticketed_features.py:1078
Functiontest_unique_tuple_dedupes_and_sorts
()
tests/unit/test_literal.py:89
Functiontest_unrecoverable_exception_on_valid_input_ending_with_backslash_issue_1893
Ensure isort doesn't raise an IndexError on valid input ending with a backslash without a trailing newline, as was the case in issue #1893: ht
tests/unit/test_regressions.py:1989
Functiontest_unsupported_encodings
(tmpdir, capsys)
tests/unit/test_main.py:847
Functiontest_unwrap_issue_762
()
tests/unit/test_isort.py:3882
Functiontest_use_parentheses
()
tests/unit/test_isort.py:759
Functiontest_uses_jinja_variables
Test a basic set of imports that use jinja variables
tests/unit/test_isort.py:2463
Functiontest_value_assignment_assignments
()
tests/unit/test_literal.py:24
Functiontest_value_assignment_dict
()
tests/unit/test_literal.py:121
Functiontest_value_assignment_unique_tuple
()
tests/unit/test_literal.py:128
Functiontest_value_mismatch
()
tests/unit/test_literal.py:9
Methodtest_variables
(self)
tests/unit/test_exceptions.py:23
Methodtest_variables
(self)
tests/unit/test_exceptions.py:33
Methodtest_variables
(self)
tests/unit/test_exceptions.py:41
Methodtest_variables
(self)
tests/unit/test_exceptions.py:50
Methodtest_variables
(self)
tests/unit/test_exceptions.py:58
Methodtest_variables
(self)
tests/unit/test_exceptions.py:66
← previousnext →701–800 of 829, ranked by callers