Package: lavacli
Version: 2.2.0-2
Severity: normal
Tags: patch

Dear Maintainer,

I'd like to submit a patch for the lavacli package that fixes a failing test in 
test_lab.py where paths containing dots aren't handled correctly. See the 
failure in https://ci.debian.net/packages/l/lavacli/unstable/amd64/

The test_base_dir test is currently comparing paths incorrectly:
  assert str(config.base_dir) == str(config.filepath).split(".")[0]

This fails when the temporary test path contains dots (e.g. 
"/tmp/autopkgtest.xVit3Q/...") because split(".") only removes text after the 
first dot.

My patch modifies the assertion to use Path.with_suffix('') instead:
  assert str(config.base_dir) == str(config.filepath.with_suffix(''))

This correctly compares the base directory with the filepath without its 
extension, regardless of how many dots appear in the path.

Thank you for considering this patch attached

Lei

Attachment: 0001-Fix-test_base_dir-to-handle-paths-containing-dots-co.patch
Description: 0001-Fix-test_base_dir-to-handle-paths-containing-dots-co.patch

Reply via email to