[FIX] test_lint: force absolute path to compute odoo path
When using the flamegraph module from a parent directory of odoo, the dirname method returns a relative path, leading to a traceback. With this commit, the odoo_path is enforced to be an absolute path. closes odoo/odoo#40147 X-original-commit: 75efe4b4ca6c0ccef6ec592b317e7c2b572f28fc Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
This commit is contained in:
@@ -24,7 +24,7 @@ class TestConflictMarkers(TransactionCase):
|
||||
|
||||
counter = 0
|
||||
|
||||
odoo_path = os.path.dirname(odoo.__file__)
|
||||
odoo_path = os.path.abspath(os.path.dirname(odoo.__file__))
|
||||
paths = odoo.addons.__path__ + [odoo_path]
|
||||
paths.remove(os.path.join(odoo_path, 'addons')) # avoid checking odoo/addons twice
|
||||
|
||||
|
||||
Reference in New Issue
Block a user