Completed
Push — master ( 1ad3a4...9b26dc )
by Wojtek
02:35
created

TestLoggingConfiguration.test_init()   A

Complexity

Conditions 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
c 1
b 0
f 0
dl 0
loc 10
rs 9.4285
1
import logging
0 ignored issues
show
Coding Style Naming introduced by
The name test_loggingConfiguration does not conform to the module naming conventions ((([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Coding Style introduced by
This module should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
2
import os
3
from unittest import TestCase
4
5
from grortir.main.logging.logging_configuration import LoggingConfiguration
6
7
8
class TestLoggingConfiguration(TestCase):
0 ignored issues
show
Coding Style introduced by
This class should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
9
    def test_init(self):
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
10
        LoggingConfiguration.init()
11
        logger = logging.getLogger(__name__)
12
        stat_info_before = os.stat('grortir.log')
13
        size_before = stat_info_before.st_size
14
        logger.info('Test INFO level')
15
        logger.debug('Test DEBUG level')
16
        stat_info_after = os.stat('grortir.log')
17
        size_after = stat_info_after.st_size
18
        self.assertTrue(size_before < size_after)
19