Skip to content

Commit 67d5d47

Browse files
committed
disable loguru by default when imported
1 parent 6d8e756 commit 67d5d47

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

src/chordnet/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
"""init.py: defines importable classes."""
2+
from loguru import logger
3+
24
from .chordnet import ChordNet
35

6+
logger.disable("chordnet")
7+
48
__all__=['ChordNet']

tests/test_net.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,12 @@
99
from unittest.mock import MagicMock, Mock, patch
1010

1111
import pytest
12+
from loguru import logger
1213

1314
from chordnet._net import _Net
1415

16+
logger.enable("chordnet")
17+
1518

1619
def test_net_initialization() -> None:
1720
"""Verifies the initial state of a _Net instance.

tests/test_node.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@
88
from unittest.mock import MagicMock, patch
99

1010
import pytest
11+
from loguru import logger
1112

1213
from chordnet._node import _Node as ChordNode
1314
from chordnet.address import Address
1415

16+
logger.enable("chordnet")
1517
# Global test variables
1618
ip: str = "1.2.3.4"
1719
port: int = 5

0 commit comments

Comments
 (0)