Skip to content

Commit

Permalink
[IMP] Pytest compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
xtof-osd committed Jul 9, 2018
1 parent 5c2e973 commit 468e61d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion goufi_base/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@

from . import models
from . import processors
from . import utils
from . import tests
from . import utils
3 changes: 2 additions & 1 deletion goufi_base/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
@license: AGPL v3
'''

from tests import test_import_file
from . import test_import_configuration
from . import test_import_file
6 changes: 3 additions & 3 deletions goufi_base/tests/test_import_file.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# -*- coding: utf-8 -*-
'''
Created on 23 deb. 2018
Created on februrary 23, 2018
@author: C. Guychard
@copyright: ©2018 Article 714
@license: AGPL v3
'''

from odoo import exceptions
import logging
import sys
import unittest

from odoo import exceptions


def log_handler_by_class(logger, handler_cls):
for handler in logger.handlers:
Expand All @@ -31,4 +32,3 @@ def remove_logging_handler(logger_name, handler_cls):
logger = logging.getLogger(logger_name)
for handler in log_handler_by_class(logger, handler_cls):
logger.removeHandler(handler)

0 comments on commit 468e61d

Please sign in to comment.