Skip to content

[Dev] ~50 library tests fail with the wrong drive on Windows #5802

Closed
@citelao

Description

@citelao

The tests are failing when run on any Windows machine that uses the default system drive of C:/ (they hard-code D:/).

Problem

# Set up beets for contributing (install poetry, etc)
# ...

poe test
# => 50+ failures, like:
# FAILED test/test_library.py::DestinationFunctionTest::test_upper_case_literal - AssertionError: assert b'C:\\base\\FOO' == b'D:\\base\\FOO'

This looks to be a regression introduced with #5224. The fix is to use the %SystemDrive% environment variable, not a hard-coded D:

Setup

  • OS: Windows 11 24H2
  • Python version: 3.11
  • beets version: commit e439c04
  • Turning off plugins made problem go away (yes/no): (n/a)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions