Project

General

Profile

Bug #1716 ยป test_converter_debug.py

Rajaram, Durga, 20 July 2015 05:01

 
1
#  This file is part of MAUS: http://micewww.pp.rl.ac.uk/projects/maus
2
# 
3
#  MAUS is free software: you can redistribute it and/or modify
4
#  it under the terms of the GNU General Public License as published by
5
#  the Free Software Foundation, either version 3 of the License, or
6
#  (at your option) any later version.
7
# 
8
#  MAUS is distributed in the hope that it will be useful,
9
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
10
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
#  GNU General Public License for more details.
12
# 
13
#  You should have received a copy of the GNU General Public License
14
#  along with MAUS.  If not, see <http://www.gnu.org/licenses/>.
15

    
16
"""
17
Tests for maus_cpp.converter
18
"""
19

    
20
import unittest
21
import os
22
import json
23

    
24
import ROOT
25
import libMausCpp # pylint: disable=W0611
26

    
27
from maus_cpp import converter
28

    
29
class ConverterTestCase(unittest.TestCase): #pylint: disable=R0904
30
    """Tests for maus_cpp.converter"""
31
    def test_convert_empty(self):
32
        """Check that converting empty document raises Exception"""
33
        json_str = json.dumps({})
34
        try:
35
            result = converter.data_repr(json_str)
36
        except Exception as e:
37
            print 'Exception ',e
38

    
39
if __name__ == "__main__":
40
    unittest.main()
41

    
    (1-1/1)