Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

test_dump_rule_file depends on OS filename sorting #3581

Closed
Closed
test_dump_rule_file depends on OS filename sorting#3581
Labels

Description

Description

The test TestRule.test_dump_rule_file in tests/licensedcode/test_models.py appears to rely on the native OS to sort directory listings when finding rule files to compare. On my system (Debian 12), this results in the test attempting to compare a rule file for GPL 2.0 to a rule file for the LZMA license, which obviously fails. Sorting the results of models.load_rules() for each fixes the problem.

How To Reproduce

git checkout develop
./configure --dev
venv/bin/py.test -n6

System configuration

  • What OS are you running on? (Windows/MacOS/Linux)
    ** Linux, specifically Debian 12
  • What version of scancode-toolkit was used to generate the scan file?
    ** The develop branch (specifically, commit 1c4d6be)
  • What installation method was used to install/run scancode? (pip/source download/other)
    ** Checkout from GitHub

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions