Exemplo n.º 1
0
 def _format_bool_(self,value):
     '''Format a string to boolean.
     
     :param value: The value to convert.
     :type value: int or str'''
     from ocgis.util.helpers import format_bool
     return(format_bool(value))
Exemplo n.º 2
0
 def _format_bool_(self, value):
     '''Format a string to boolean.
     
     :param value: The value to convert.
     :type value: int or str'''
     from ocgis.util.helpers import format_bool
     return (format_bool(value))
Exemplo n.º 3
0
    def _format_bool_(value):
        """
        Format a string to boolean.

        :param value: The value to convert.
        :type value: int or str
        """

        from ocgis.util.helpers import format_bool

        return format_bool(value)
Exemplo n.º 4
0
    def _format_bool_(value):
        """
        Format a string to boolean.

        :param value: The value to convert.
        :type value: int or str
        """

        from ocgis.util.helpers import format_bool

        return format_bool(value)
Exemplo n.º 5
0
 def test_format_bool(self):
     mmap = {
         0: False,
         1: True,
         't': True,
         'True': True,
         'f': False,
         'False': False
     }
     for key, value in mmap.iteritems():
         ret = format_bool(key)
         self.assertEqual(ret, value)
Exemplo n.º 6
0
 def test_format_bool(self):
     mmap = {0:False,1:True,'t':True,'True':True,'f':False,'False':False}
     for key,value in mmap.iteritems():
         ret = format_bool(key)
         self.assertEqual(ret,value)