<s> import logging <EOL> import os <EOL> import unittest <EOL> from nose . plugins . attrib import attr <EOL> logging . basicConfig ( level = logging . DEBUG ) <EOL> logger = logging . getLogger ( __file__ ) <EOL> from checks . system . unix import Cpu <EOL> @ attr ( requires = '<STR_LIT>' ) <EOL> class TestSystem ( unittest . TestCase ) : <EOL> def testCPU ( self ) : <EOL> global logger <EOL> logger . info ( os . environ [ '<STR_LIT>' ] ) <EOL> cpu = Cpu ( logger ) <EOL> res = cpu . check ( { } ) <EOL> assert abs ( reduce ( lambda a , b : a + b , res . values ( ) , <NUM_LIT:0> ) - <NUM_LIT:100> ) <= <NUM_LIT:5> , res </s>
