File: test_logging_tools.py

package info (click to toggle)
python-easydev 0.13.3%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 636 kB
  • sloc: python: 1,904; makefile: 116; javascript: 49
file content (32 lines) | stat: -rw-r--r-- 623 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from easydev import Logging


def test_logging():

    l = Logging("INFO")
    l.name = "test"
    l.info("test")
    l.debug("test")
    l.warning("test")
    l.error("test")
    l.critical("test")

    for level in ["DEBUG", "INFO", "ERROR", "WARNING", "CRITICAL"]:
        l.level = level
        assert l.level == level
    l.level = True
    l.level = False
    for x in [10, 20, 30, 40, 50]:
        l.level = x

    try:
        l.level = "WARN"
        assert Fales
    except:
        assert True

    # FIXME is this working ??wierd syntax in loggibg_tools.
    import copy

    copy.copy(l)
    copy.deepcopy(l)