Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
diceware-debian
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drebs
diceware-debian
Commits
c622fa12
Commit
c622fa12
authored
8 years ago
by
ulif
Browse files
Options
Downloads
Patches
Plain Diff
Add test: get logger by name.
parent
f87d44ea
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_logger.py
+7
-0
7 additions, 0 deletions
tests/test_logger.py
with
7 additions
and
0 deletions
tests/test_logger.py
+
7
−
0
View file @
c622fa12
import
logging
from
diceware.logger
import
logger
...
...
@@ -9,3 +10,9 @@ def test_logger_exists():
def
test_logger_has_handler
():
# the logger has at least one handler
assert
len
(
logger
.
handlers
)
>
0
def
test_get_logger_by_name
():
# we can get a logger directly from std lib
my_logger
=
logging
.
getLogger
(
"
ulif.diceware
"
)
assert
len
(
my_logger
.
handlers
)
>
0
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment