Exemple #1
0
 def test_to_numeric_passthrough(self):
     """
     Test to_numeric with 'passthrough'
     """
     self.assertEqual(zfs.to_numeric("passthrough"), "passthrough")
     self.assertEqual(zfs.to_numeric(zfs.to_numeric("passthrough")),
                      "passthrough")
Exemple #2
0
 def test_to_numeric_passthrough(self):
     '''
     Test to_numeric with 'passthrough'
     '''
     self.assertEqual(zfs.to_numeric('passthrough'), 'passthrough')
     self.assertEqual(zfs.to_numeric(zfs.to_numeric('passthrough')),
                      'passthrough')
Exemple #3
0
 def test_to_numeric_none(self):
     """
     Test to_numeric with 'none'
     """
     self.assertEqual(zfs.to_numeric(None), "none")
     self.assertEqual(zfs.to_numeric(zfs.to_numeric(None)), "none")
Exemple #4
0
 def test_to_numeric_int(self):
     """
     Test to_numeric with 42
     """
     self.assertEqual(zfs.to_numeric(42), 42)
     self.assertEqual(zfs.to_numeric(zfs.to_numeric(42)), 42)
Exemple #5
0
 def test_to_numeric_str(self):
     """
     Test to_numeric with '42'
     """
     self.assertEqual(zfs.to_numeric("42"), 42)
     self.assertEqual(zfs.to_numeric(zfs.to_numeric("42")), 42)
Exemple #6
0
 def test_to_numeric_none(self):
     '''
     Test to_numeric with 'none'
     '''
     self.assertEqual(zfs.to_numeric(None), 'none')
     self.assertEqual(zfs.to_numeric(zfs.to_numeric(None)), 'none')
Exemple #7
0
 def test_to_numeric_int(self):
     '''
     Test to_numeric with 42
     '''
     self.assertEqual(zfs.to_numeric(42), 42)
     self.assertEqual(zfs.to_numeric(zfs.to_numeric(42)), 42)
Exemple #8
0
 def test_to_numeric_str(self):
     '''
     Test to_numeric with '42'
     '''
     self.assertEqual(zfs.to_numeric('42'), 42)
     self.assertEqual(zfs.to_numeric(zfs.to_numeric('42')), 42)