Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PyCQA/isort
/ functions
Functions
829 in github.com/PyCQA/isort
⨍
Functions
829
◇
Types & classes
59
↳
Endpoints
8
Function
test_remove_imports
Ensures removing imports works as expected.
tests/unit/test_isort.py:933
Function
test_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
Function
test_reverse_relative_imports_issue_417
()
tests/unit/test_isort.py:3846
Function
test_reverse_sort_relative_in_force_sorted_sections_issue_1659
Ensure reverse ordered relative imports are sorted within sections
tests/unit/test_isort.py:3315
Function
test_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
Function
test_safety_skips
(tmpdir, enabled: bool)
tests/unit/test_isort.py:3759
Function
test_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
Function
test_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
Function
test_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
Function
test_set_bracket_and_quotes
()
tests/unit/test_literal.py:45
Function
test_settings_overwrite
Test to ensure settings overwrite instead of trying to combine.
tests/unit/test_isort.py:1776
Function
test_settings_path_skip_issue_909
(tmpdir)
tests/unit/test_isort.py:4241
Function
test_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
Function
test_show_files
(capsys, tmpdir)
tests/unit/test_main.py:121
Function
test_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
Function
test_single_element_tuple_keeps_trailing_comma
()
tests/unit/test_literal.py:41
Function
test_single_element_tuple_wraps_and_keeps_comma
()
tests/unit/test_literal.py:93
Function
test_single_line_exclusions
()
tests/unit/test_isort.py:5090
Function
test_single_multiline
Test the case where a single import spawns multiple lines.
tests/unit/test_isort.py:1608
Function
test_skip
Ensure skipping a single import will work as expected.
tests/unit/test_isort.py:806
Function
test_skip_glob
(tmpdir, skip_glob_assert: tuple[list[str], int, set[str]])
tests/unit/test_isort.py:3806
Function
test_skip_paths_issue_938
(tmpdir)
tests/unit/test_isort.py:4271
Function
test_skip_sort_reexports
()
tests/unit/test_action_comments.py:51
Function
test_skip_with_file_name
Ensure skipping a file works even when file_contents is provided.
tests/unit/test_isort.py:826
Function
test_skip_within_file
Ensure skipping a whole file works.
tests/unit/test_isort.py:835
Function
test_smart_lines_after_import_section
Tests the default 'smart' behavior for dealing with lines after the import section
tests/unit/test_isort.py:1741
Function
test_sort_code_string_mixed_newlines
()
tests/unit/test_api.py:88
Function
test_sort_configurable_sort_issue_1732
Test support for pluggable isort sort functions.
tests/unit/test_ticketed_features.py:1019
Function
test_sort_file
(benchmark, imperfect)
tests/benchmark/test_api.py:18
Function
test_sort_file
(imperfect)
tests/unit/test_api.py:33
Function
test_sort_file_in_place
(benchmark, imperfect)
tests/benchmark/test_api.py:26
Function
test_sort_file_in_place
(imperfect)
tests/unit/test_api.py:38
Function
test_sort_file_to_stdout
(capsys, imperfect)
tests/unit/test_api.py:43
Function
test_sort_file_with_bad_syntax
(tmpdir)
tests/unit/test_api.py:24
Function
test_sort_imports
(tmpdir)
tests/unit/test_main.py:44
Function
test_sort_imports_error_handling
(tmpdir, capsys)
tests/unit/test_main.py:59
Function
test_sort_on_number
Ensure numbers get sorted logically (10 > 9 not the other way around)
tests/unit/test_isort.py:163
Function
test_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
Function
test_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
Function
test_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
Function
test_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
Function
test_sort_relative_in_force_sorted_sections_issue_1659
Ensure relative imports are sorted within sections
tests/unit/test_isort.py:3298
Function
test_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
Function
test_sort_within_section
Test to ensure its possible to force isort to sort within sections
tests/unit/test_isort.py:2721
Function
test_sort_within_section_case_honored
Ensure isort can do partial case-sensitive sorting in force-sorted sections
tests/unit/test_isort.py:2771
Function
test_sort_within_section_comments_issue_436
Test to ensure sort within sections leaves comments untouched
tests/unit/test_isort.py:3242
Function
test_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
Function
test_sorted_imports_multiple_configs
()
tests/unit/test_api.py:76
Function
test_sorting_with_two_top_comments
Test to ensure isort will sort files that contain 2 top comments
tests/unit/test_isort.py:2826
Function
test_split_on_trailing_comma
()
tests/unit/test_isort.py:5462
Function
test_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
Function
test_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
Function
test_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
Function
test_split_on_trailing_comma_wih_as
()
tests/unit/test_isort.py:5478
Function
test_split_position
Ensure isort splits on import instead of . when possible
tests/unit/test_isort.py:2134
Method
test_src_paths_are_combined_and_deduplicated
(self)
tests/unit/test_settings.py:89
Method
test_src_paths_supports_glob_expansion
(self, tmp_path)
tests/unit/test_settings.py:94
Function
test_standard_library_deprecates_user_issue_778
()
tests/unit/test_isort.py:4235
Function
test_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
Function
test_sticky_comments
Test to ensure it is possible to make comments 'stick' above imports
tests/unit/test_isort.py:2351
Function
test_stream_skip_file
(tmpdir, capsys)
tests/unit/test_main.py:877
Function
test_strict_whitespace_by_default
(capsys)
tests/unit/test_isort.py:3177
Function
test_strict_whitespace_no_closing_newline_issue_676
(capsys)
tests/unit/test_isort.py:3185
Function
test_sys_path_mutation
Test to ensure sys.path is not modified
tests/unit/test_isort.py:3024
Function
test_tab_character_in_import
Ensure isort correctly handles import statements that contain a tab character
tests/unit/test_isort.py:2128
Function
test_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
Function
test_thirdy_party_overrides_standard_section
Test to ensure changing the default section works as expected.
tests/unit/test_isort.py:1116
Function
test_titled_and_footered_imports
Tests setting custom footers to import sections.
tests/unit/test_isort.py:1395
Function
test_titled_imports
Tests setting custom titled/commented import sections.
tests/unit/test_isort.py:1254
Function
test_to_ensure_correctly_handling_of_whitespace_only_issue_811
( ws: str, capsys: pytest.CaptureFixture[str], )
tests/unit/test_isort.py:4224
Function
test_to_ensure_empty_line_not_added_to_file_start_issue_889
()
tests/unit/test_isort.py:4218
Function
test_to_ensure_importing_from_imports_module_works_issue_662
()
tests/unit/test_isort.py:3599
Function
test_to_ensure_imports_are_brought_to_top_issue_651
()
tests/unit/test_isort.py:3578
Function
test_to_ensure_no_unexpected_changes_issue_666
()
tests/unit/test_isort.py:3611
Function
test_to_ensure_tabs_dont_become_space_issue_665
()
tests/unit/test_isort.py:3630
Function
test_top_comments
Ensure correct behavior with top comments
tests/unit/test_isort.py:2390
Function
test_top_doc_string
()
tests/unit/test_identify.py:33
Function
test_top_level_import_order
()
tests/unit/test_isort.py:5035
Function
test_top_of_line_comments
Test to ensure top of line comments stay where they should: issue 260
tests/unit/test_isort.py:2612
Function
test_top_only
()
tests/unit/test_identify.py:11
Function
test_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
Function
test_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
Function
test_trie
()
tests/unit/test_utils.py:4
Function
test_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
Function
test_unique_tuple_dedupes_and_sorts
()
tests/unit/test_literal.py:89
Function
test_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
Function
test_unsupported_encodings
(tmpdir, capsys)
tests/unit/test_main.py:847
Function
test_unwrap_issue_762
()
tests/unit/test_isort.py:3882
Function
test_use_parentheses
()
tests/unit/test_isort.py:759
Function
test_uses_jinja_variables
Test a basic set of imports that use jinja variables
tests/unit/test_isort.py:2463
Function
test_value_assignment_assignments
()
tests/unit/test_literal.py:24
Function
test_value_assignment_dict
()
tests/unit/test_literal.py:121
Function
test_value_assignment_unique_tuple
()
tests/unit/test_literal.py:128
Function
test_value_mismatch
()
tests/unit/test_literal.py:9
Method
test_variables
(self)
tests/unit/test_exceptions.py:23
Method
test_variables
(self)
tests/unit/test_exceptions.py:33
Method
test_variables
(self)
tests/unit/test_exceptions.py:41
Method
test_variables
(self)
tests/unit/test_exceptions.py:50
Method
test_variables
(self)
tests/unit/test_exceptions.py:58
Method
test_variables
(self)
tests/unit/test_exceptions.py:66
← previous
next →
701–800 of 829, ranked by callers