MCPcopy Create free account

hub / github.com/PyCQA/isort / functions

Functions820 in github.com/PyCQA/isort

Functiontest_isort_allows_setting_import_types_issue_1181
Test to ensure isort provides a way to set the type of imports. See: https://github.com/pycqa/isort/issues/1181
tests/unit/test_ticketed_features.py:362
Functiontest_isort_auto_detects_and_ignores_invalid_from_imports_issue_1688
isort should automatically detect and ignore incorrectly written from import statements see: https://github.com/PyCQA/isort/issues/1688
tests/unit/test_ticketed_features.py:862
Functiontest_isort_automatically_removes_duplicate_aliases_issue_1193
Test to ensure isort can automatically remove duplicate aliases. See: https://github.com/pycqa/isort/issues/1281
tests/unit/test_ticketed_features.py:32
Functiontest_isort_can_combine_reverse_sort_with_force_sort_within_sections_issue_1726
isort should support reversing import order even with force sort within sections turned on. See: https://github.com/PyCQA/isort/issues/1726
tests/unit/test_ticketed_features.py:936
Functiontest_isort_can_push_star_imports_above_others_issue_1504
isort should provide a way to push star imports above other imports to avoid explicit imports from being overwritten. see: https://github.com/
tests/unit/test_ticketed_features.py:913
Functiontest_isort_can_turn_off_import_adds_with_action_comment_issue_1737
()
tests/unit/test_ticketed_features.py:969
Functiontest_isort_correctly_handles_unix_vs_linux_newlines_issue_1566
()
tests/unit/test_regressions.py:1675
Functiontest_isort_does_not_drop_aliased_import_when_plain_name_has_a_comment
A name imported both plainly (with a trailing comment) and aliased must keep its alias when a sibling sorts ahead of it. ``from x import m #
tests/unit/test_regressions.py:2428
Functiontest_isort_doesnt_float_to_top_correctly_when_imports_not_at_top_issue_1382
isort should float existing imports to the top, if they are currently below the top. See: https://github.com/PyCQA/isort/issues/1382
tests/unit/test_regressions.py:863
Functiontest_isort_doesnt_lose_imports_or_comments
(config: isort.Config, disregard_skip: bool)
tests/integration/test_setting_combinations.py:1868
Functiontest_isort_doesnt_mangle_code_when_adding_imports_issue_1444
isort should NEVER mangle code. This particularly nasty and easy to reproduce bug, caused isort to produce invalid code just by adding a single im
tests/unit/test_regressions.py:738
Functiontest_isort_doesnt_misplace_add_import_issue_1445
Test to ensure isort won't misplace an added import depending on docstring position See: https://github.com/PyCQA/isort/issues/1445
tests/unit/test_regressions.py:706
Functiontest_isort_doesnt_misplace_comments_issue_1431
Test to ensure isort won't misplace comments. See: https://github.com/PyCQA/isort/issues/1431
tests/unit/test_regressions.py:692
Functiontest_isort_doesnt_remove_as_imports_when_combine_star_issue_1380
Test to ensure isort will not remove as imports along side other imports when requested to combine star imports together. See: https://github.
tests/unit/test_ticketed_features.py:421
Functiontest_isort_doesnt_rewrite_import_with_dot_to_from_import_issue_1280
Test to ensure isort doesn't rewrite imports in the from of import y.x into from y import x. This is because they are not technically fully equiva
tests/unit/test_regressions.py:366
Functiontest_isort_duplicating_comments_issue_1264
Ensure isort doesn't duplicate comments when force_sort_within_sections is set to `True` as was the case in issue #1264: https://github.com/pycqa/
tests/unit/test_regressions.py:12
Functiontest_isort_enables_deduping_section_headers_issue_953
isort should provide a way to only have identical import headings show up once. See: https://github.com/pycqa/isort/issues/953
tests/unit/test_ticketed_features.py:386
Functiontest_isort_enables_floating_imports_to_top_of_module_issue_1228
Test to ensure isort will allow floating all non-indented imports to the top of a file. See: https://github.com/pycqa/isort/issues/1228.
tests/unit/test_ticketed_features.py:45
Functiontest_isort_ensures_blank_line_between_import_and_comment
()
tests/unit/test_isort.py:4395
Functiontest_isort_filename_overrides
Tests isorts available approaches for overriding filename and extension based behavior
tests/unit/test_main.py:369
Functiontest_isort_float_to_top_correctly_identifies_single_line_comments_1499
Test to ensure isort correctly handles the case where float to top is used to push imports to the top and the top comment is a multiline type but
tests/unit/test_regressions.py:1230
Functiontest_isort_float_to_top_overrides
Tests isorts supports overriding float to top from CLI
tests/unit/test_main.py:446
Functiontest_isort_float_to_top_respects_isort_off_with_crlf_issue_2528
()
tests/unit/test_regressions.py:836
Functiontest_isort_float_to_top_with_sort_on_off_tests
Characterization test for current behaviour of float-to-top on isort: on/off sections. - imports in isort:off sections stay where they are - i
tests/unit/test_regressions.py:761
Functiontest_isort_intelligently_places_noqa_comments_issue_1456
()
tests/unit/test_ticketed_features.py:471
Functiontest_isort_is_idempotent
(source_code: str, config: isort.Config, disregard_skip: bool)
tests/integration/test_hypothesmith.py:95
Functiontest_isort_is_idempotent
(config: isort.Config, disregard_skip: bool)
tests/integration/test_setting_combinations.py:1012
Functiontest_isort_keeps_comments_issue_691
()
tests/unit/test_isort.py:4360
Functiontest_isort_losing_imports_vertical_prefix_from_module_import_wrap_mode_issue_1542
Ensure isort doesn't lose imports when a comment is combined with an import and wrap mode VERTICAL_PREFIX_FROM_MODULE_IMPORT is used. See: htt
tests/unit/test_regressions.py:1517
Functiontest_isort_multiline_with_tab_issue_1714
()
tests/unit/test_isort.py:4387
Functiontest_isort_nested_imports
Ensure imports in a nested block get sorted correctly
tests/unit/test_isort.py:4550
Functiontest_isort_off
Test that isort can be turned on and off at will using comments
tests/unit/test_isort.py:4578
Functiontest_isort_off_and_on
Test so ensure isort: off action comment and associated on action comment work together
tests/unit/test_action_comments.py:6
Functiontest_isort_preserves_empty_inline_comments
isort should not strip empty inline comments (bare `#`). See: https://github.com/PyCQA/isort/issues/1913
tests/unit/test_ticketed_features.py:1231
Functiontest_isort_provides_official_api_for_diff_output_issue_1335
Test to ensure isort API for diff capturing allows capturing diff without sys.stdout. See: https://github.com/pycqa/isort/issues/1335.
tests/unit/test_ticketed_features.py:161
Functiontest_isort_respects_quiet_from_sort_file_api_see_1461
Test to ensure isort respects the quiet API parameter when passed in via the API. See: https://github.com/PyCQA/isort/issues/1461.
tests/unit/test_ticketed_features.py:538
Functiontest_isort_should_be_able_to_add_independent_of_doc_string_placement_issue_1420
isort should be able to know when an import requested to be added is successfully added, independent of where the top doc string is located. S
tests/unit/test_regressions.py:638
Functiontest_isort_should_keep_all_as_and_non_as_imports_issue_1523
isort should keep as and non-as imports of the same path that happen to exist within the same statement. See: https://github.com/PyCQA/isort/i
tests/unit/test_regressions.py:1341
Functiontest_isort_should_keep_multi_noqa_with_star_issue_1744
()
tests/unit/test_regressions.py:1791
Functiontest_isort_should_keep_multiple_noqa_comments_force_single_line_mode_issue_1721
()
tests/unit/test_regressions.py:1846
Functiontest_isort_should_leave_non_import_from_lines_alone_issue_1488
isort should never mangle non-import from statements. See: https://github.com/PyCQA/isort/issues/1488
tests/unit/test_regressions.py:1098
Functiontest_isort_should_never_quietly_remove_imports_in_any_hangin_mode_issue_1741
( multi_line_output: int, )
tests/unit/test_regressions.py:1775
Functiontest_isort_should_never_quietly_remove_imports_in_hanging_line_mode_issue_1741
()
tests/unit/test_regressions.py:1719
Functiontest_isort_should_only_add_imports_to_valid_location_issue_1769
()
tests/unit/test_regressions.py:1862
Functiontest_isort_should_produce_the_same_code_on_subsequent_runs_issue_1799
(tmpdir)
tests/unit/test_regressions.py:1933
Functiontest_isort_should_warn_on_empty_custom_config_issue_1433
Feedback should be provided when a user provides a custom settings file that has no discoverable configuration. See: https://github.com/PyCQA/
tests/unit/test_ticketed_features.py:599
Functiontest_isort_shouldnt_add_extra_line_float_to_top_issue_1667
()
tests/unit/test_regressions.py:1636
Functiontest_isort_shouldnt_add_extra_new_line_when_fass_and_n_issue_1315
Test to ensure isort doesn't add a second extra new line when combining --fss and -n options. See: https://github.com/pycqa/isort/issues/1315
tests/unit/test_regressions.py:332
Functiontest_isort_shouldnt_add_extra_new_lines_with_import_heading_issue_1670
()
tests/unit/test_regressions.py:1605
Functiontest_isort_shouldnt_duplicate_comments_issue_1631
()
tests/unit/test_regressions.py:1583
Functiontest_isort_shouldnt_fail_on_long_from_with_dot_issue_1190
Test to ensure that isort will correctly handle formatting a long from import that contains a dot. See: https://github.com/pycqa/isort/issues/
tests/unit/test_regressions.py:305
Functiontest_isort_shouldnt_introduce_extra_lines_with_fass_issue_1322
Tests to ensure isort doesn't introduce extra lines when used with fass option. See: https://github.com/pycqa/isort/issues/1322
tests/unit/test_regressions.py:383
Functiontest_isort_shouldnt_introduce_syntax_error_issue_1539
isort should NEVER introduce syntax errors. In 5.5.4 some strings that contained a line starting with from could lead to no empty paren. See:
tests/unit/test_regressions.py:1355
Functiontest_isort_shouldnt_mangle_from_multi_line_string_issue_1507
isort was seen mangling lines that happened to contain the word from after a yield happened to be in a file. Clearly this shouldn't happen. Se
tests/unit/test_regressions.py:1301
Functiontest_isort_shouldnt_move_noqa_comment_issue_1594
()
tests/unit/test_regressions.py:1653
Functiontest_isort_shouldnt_split_skip_issue_1548
Ensure isort doesn't add a spurious new line if isort: skip is combined with float to top. See: https://github.com/PyCQA/isort/issues/1548.
tests/unit/test_regressions.py:1404
Functiontest_isort_shouldnt_split_skip_issue_1556
()
tests/unit/test_regressions.py:1490
Functiontest_isort_skip_is_honored_with_future_import_issue_2092
A per-line ``isort: skip`` must be honored even when a ``__future__`` import is present. ``__future__`` imports are always floated to the very to
tests/unit/test_regressions.py:2399
Functiontest_isort_skipped_nested_imports_issue_1339
Ensure `isort:skip are honored in nested imports. See: https://github.com/pycqa/isort/issues/1339.
tests/unit/test_regressions.py:486
Functiontest_isort_split
Test the ability to split isort import sections
tests/unit/test_isort.py:4592
Functiontest_isort_support_custom_groups_above_stdlib_that_contain_stdlib_modules_issue_1407
Test to ensure it is possible to declare custom groups above standard library that include modules from the standard library. See: https://git
tests/unit/test_ticketed_features.py:452
Functiontest_isort_supports_append_only_imports_issue_727
Test to ensure isort provides a way to only add imports as an append. See: https://github.com/pycqa/isort/issues/727.
tests/unit/test_ticketed_features.py:205
Functiontest_isort_supports_shared_profiles_issue_970
Test to ensure isort provides a way to use shared profiles. See: https://github.com/pycqa/isort/issues/970.
tests/unit/test_ticketed_features.py:232
Functiontest_isort_treats_src_paths_same_as_from_config_as_cli_issue_1711
(tmpdir)
tests/unit/test_regressions.py:1687
Functiontest_isort_warns_when_known_sections_dont_match_issue_1331
Test to ensure that isort warns if there is a mismatch between sections and known_sections. See: https://github.com/pycqa/isort/issues/1331.
tests/unit/test_ticketed_features.py:171
Functiontest_isort_with_single_character_import
Tests to ensure isort handles single capatilized single character imports as class objects by default See Issue #376: https://github.com/pycq
tests/unit/test_isort.py:4540
Functiontest_isort_with_stdin
(capsys)
tests/unit/test_main.py:493
Functiontest_keep_comments
Test to ensure isort properly keeps comments in tact after sorting.
tests/unit/test_isort.py:1811
Functiontest_known_pattern_path_expansion
Test to ensure patterns ending with path sep gets expanded and nested packages treated as known patterns.
tests/unit/test_isort.py:1123
Methodtest_known_settings
(self)
tests/unit/test_settings.py:25
Methodtest_lazy_from_import_is_stored_in_lazy_from_bucket
(self)
tests/unit/test_lazy_imports.py:14
Functiontest_lazy_from_import_multiple_names
``lazy from X import a, b`` is supported and names are sorted alphabetically.
tests/unit/test_lazy_imports.py:106
Functiontest_lazy_from_imports_come_after_eager
lazy from ... import lines follow all eager import lines within the section.
tests/unit/test_lazy_imports.py:39
Functiontest_lazy_from_sorted_alphabetically
Multiple lazy from imports are sorted alphabetically by module name.
tests/unit/test_lazy_imports.py:52
Functiontest_lazy_import_with_alias
``lazy import X as Y`` is supported and sorted correctly.
tests/unit/test_lazy_imports.py:97
Functiontest_lazy_imports_appear_after_eager_in_each_section_independently
Each section gets its own eager-first / lazy-last grouping.
tests/unit/test_lazy_imports.py:90
Methodtest_lazy_imports_are_placed_in_correct_section
Lazy imports must be placed in the same section as their eager counterparts.
tests/unit/test_lazy_imports.py:24
Methodtest_lazy_straight_import_is_stored_in_lazy_straight_bucket
(self)
tests/unit/test_lazy_imports.py:9
Functiontest_lazy_straight_imports_come_after_eager
lazy import lines follow all eager import lines within the section.
tests/unit/test_lazy_imports.py:34
Functiontest_lazy_straight_sorted_alphabetically
Multiple lazy straight imports are sorted alphabetically.
tests/unit/test_lazy_imports.py:47
Functiontest_length_sort
Test setting isort to sort on length instead of alphabetically.
tests/unit/test_isort.py:608
Functiontest_length_sort_section
Test setting isort to sort on length instead of alphabetically for a specific section.
tests/unit/test_isort.py:646
Functiontest_length_sort_straight
Test setting isort to sort straight imports on length instead of alphabetically.
tests/unit/test_isort.py:625
Functiontest_line__comment_with_brackets__expects_unchanged_comment
(multi_line_output, expected)
tests/unit/test_wrap.py:40
Functiontest_line_endings_are_detected_ignoring_whitespace
Test to ensure line endings are not converted
tests/unit/test_isort.py:3445
Functiontest_line_length
Ensure isort enforces the set line_length.
tests/unit/test_isort.py:170
Functiontest_lines_between_sections
Test to ensure lines_between_sections works
tests/unit/test_isort.py:2832
Functiontest_list_of_non_strings_uses_repr
()
tests/unit/test_literal.py:85
Functiontest_list_preserves_bracket_type_tuple
()
tests/unit/test_literal.py:37
Functiontest_list_uses_double_quotes
()
tests/unit/test_literal.py:33
Functiontest_literal_dict_sort_respects_black_profile_issue_2280
The ``# isort: dict`` literal sort shares the same formatter as ``--sort-reexports`` and must likewise honor the black profile rather than stdlib
tests/unit/test_regressions.py:2194
Functiontest_literal_sort_at_top_of_file_issue_1792
()
tests/unit/test_regressions.py:1892
Functiontest_long_alias_using_paren_issue_957
()
tests/unit/test_isort.py:3122
Functiontest_long_dict_wraps_vertical_hanging_indent
()
tests/unit/test_literal.py:111
Functiontest_long_import_wrap_support_with_mode_2
Test to ensure mode 2 still allows wrapped imports with slash
tests/unit/test_isort.py:3385
Functiontest_long_line_comments
Ensure isort correctly handles comments at the end of extremely long lines
tests/unit/test_isort.py:2108
Functiontest_long_list_wraps_vertical_hanging_indent
()
tests/unit/test_literal.py:49
Functiontest_long_single_line
Test to ensure long single lines get handled correctly
tests/unit/test_isort.py:3034
Functiontest_main
(capsys, tmpdir)
tests/unit/test_main.py:173
Functiontest_missing_default_section
(tmpdir)
tests/unit/test_main.py:141
← previousnext →501–600 of 820, ranked by callers