Ejemplo n.º 1
0
 def test_section(self):
     bt.Tags().tags = {
         'first': '512',
         'last': '1024',
         'increment': '64',
         'run': 'OMP_NUM_THREADS={0} N={1} ./{2}',
         'cores': '2',
         'size': '512',
         'program': 'matrix',
         'dir': 'tests/examples',
         'clean': 'make clean',
         'build': 'CFLAGS="{0}" make',
         'cflags': '-Wall -Wextra',
     }
     section = bt.ScalingSection()
     assert section, 'could not init ScalingSection'
     assert section.gather(), 'could not gather ScalingSection'
     assert section.get(), 'could not get ScalingSection'
Ejemplo n.º 2
0
 def test_show(self):
     bt.Tags().tags = {'key0': 'value0', 'key1': 'value1'}
     assert bt.Section('name').show(), 'could not show Section'
Ejemplo n.º 3
0
 def test_get(self):
     bt.Tags().tags = {'key0': 'value0', 'key1': 'value1'}
     assert bt.Section(
         'name').get()['key0'] == 'value0', 'could not get Section tags'
Ejemplo n.º 4
0
 def test_gather(self):
     bt.Tags().tags = {}
     assert bt.Section('name').gather(), 'could not gather Section'
Ejemplo n.º 5
0
 def test_init(self):
     """Test how TestSection initialize."""
     bt.Tags().tags = {}
     assert bt.Section('name'), 'could not init Section without tags'
     bt.Tags().tags = {'key0': 'value0', 'key1': 'value1'}
     assert bt.Section('name'), 'could not init Section with tags'