Confusing Python disabledTestPaths behaviour

I just found a very confusing behaviour of Python’s disabledTestPaths attribute, which is declared as a list (example) , but is automatically converted in to string.

Try in repl:

nix repl

nix-repl> :l .

nix-repl> pkgs.python3.pkgs.branca.disabledTestPaths
"tests/test_utilities.py"

Even worse, it is inconsistent with disabledTests which is NOT converted (stays as a list):

nix-repl> pkgs.python3.pkgs.branca.disabledTests
[
  "test_rendering_utf8_iframe"
  "test_rendering_figure_notebook"
]

I guess, string conversion is done here.

What do you think about this ? Is this really needed ?

1 Like

PR created mk-python-derivation: avoid conversion of disabledTestPaths list to string by imincik · Pull Request #377266 · NixOS/nixpkgs · GitHub .

1 Like