Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test failures with Black >=24.2 #535

Closed
10 tasks
akaihola opened this issue Feb 26, 2024 · 0 comments · Fixed by #550 or #553
Closed
10 tasks

Test failures with Black >=24.2 #535

akaihola opened this issue Feb 26, 2024 · 0 comments · Fixed by #550 or #553
Assignees
Labels
enhancement New feature or request

Comments

@akaihola
Copy link
Owner

If Black 24.2 or newer is installed, the test suite has multiple errors

To Reproduce
Steps to reproduce the behavior:

  1. Clone this repository: git clone https://github.com/akaihola/darker.git
  2. Do an editable install: cd darker ; pip install -e . black==24.2.0
  3. Run tests: pytest
  4. See test errors

Expected behavior
All tests should pass

Some failing tests

  • test_command_line.py:test_parse_command_line_config_src:
    SystemExit: 2 with pytest: error: the following arguments are required: PATH\n
  • test_command_line.py:test_parse_command_line_config_location_specified:
    args.lint == [], expected "pylint" when argv=["."] (first test case)
  • test_command_line.py:test_parse_command_line_config_location_specified:
    args.lint == [], expected "flake8" when argv=["./subdir/"] (second test case)
  • test_config.py:test_load_config:
    load_config() returns {'config': 'no_pyp'}, expected {'config': 'has_pyp'} when cwd="has_pyp" or "has_pyp/lvl1" (cases no. 5 & 6)
  • test_config.py:test_load_config:
    load_config() returns {'config': 'no_pyp'}, expected {'config': 'has_pyp'} when pwd and srcs point to "has_pyp/lvl1/l1.py" (cases no. 19–22)
  • test_config.py:test_load_config:
    load_config() returns {'config': 'no_pyp'}, expected lots of options when srcs=["full_example/full.py"] (case no. 23)
  • test_config.py:test_load_config:
    load_config() returns {'config': 'no_pyp'}, expected {'stdout': True} when srcs=['stdout_example/dummy.py'](case no. 24)
  • test_highlighting.py:test_should_use_color_pygments:
    should_use_color() returns True, expected False when pyproject_toml_color = 'color = false', tty = True, config_from_env_and_argv = None
  • test_highlighting.py:test_should_use_color_pygments:
    should_use_color() returns False, expected True when pyproject_toml_color = 'color = true ', tty = False, config_from_env_and_argv = None
  • test_import_sorting.py:test_isort_config:
    does not wrap the import at all when settings_file=None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
1 participant