Skip to content

Commit

Permalink
Fix logger interaction with test runner in Odoo 18
Browse files Browse the repository at this point in the history
  • Loading branch information
sbidoul committed Oct 23, 2024
1 parent cc52609 commit 62f088d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
import pytest
from click_odoo import odoo, odoo_bin

# This hack is necessary because the way CliRunner patches
# stdout is not compatible with the Odoo logging initialization
# mechanism. Logging is therefore tested with subprocesses.
odoo.netsvc._logger_init = True
if odoo.release.version_info < (18, 0):
# This hack is necessary because the way CliRunner patches
# stdout is not compatible with the Odoo logging initialization
# mechanism. Logging is therefore tested with subprocesses.
odoo.netsvc._logger_init = True


def _init_odoo_db(dbname, test_addons_dir=None):
Expand Down

0 comments on commit 62f088d

Please sign in to comment.