'Functions that have not yet been tested'

def test_utils(self):

    self.assertIsNotNone(ivre.config.guess_prefix())
    self.assertIsNone(ivre.config.guess_prefix('inexistant'))
    (res, out1, err) = RUN(['ivre'])
    self.assertEqual(res, 0)
    self.assertTrue((not err))
    (res, out2, err) = RUN(['ivre', 'help'])
    self.assertEqual(res, 0)
    self.assertTrue((not err))
    self.assertEqual(out1, out2)
    (res, _, err) = RUN(['ivre', 'version'])
    self.assertEqual(res, 0)
    self.assertTrue((not err))
    (res, _, _) = RUN(['ivre', 'inexistant'])
    self.assertTrue(res)
    with self.assertRaises(ValueError):
        ivre.utils.range2nets((2, 1))
    teststr = "TEST    STRING    -./*'"
    self.assertEqual(ivre.utils.regexp2pattern(teststr), (re.escape(teststr), 0))
    self.assertEqual(ivre.utils.regexp2pattern(re.compile((('^' + re.escape(teststr)) + '$'))), (re.escape(teststr), 0))
    self.assertEqual(ivre.utils.regexp2pattern(re.compile(re.escape(teststr))), ((('.*' + re.escape(teststr)) + '.*'), 0))
    self.assertEqual(ivre.utils.str2list(teststr), teststr)
    teststr = '1,2|3'
    self.assertItemsEqual(ivre.utils.str2list(teststr), ['1', '2', '3'])
    self.assertTrue(ivre.utils.isfinal(1))
    self.assertTrue(ivre.utils.isfinal('1'))
    self.assertFalse(ivre.utils.isfinal([]))
    self.assertFalse(ivre.utils.isfinal({}))
    ports = [1, 3, 2, 4, 6, 80, 5, 5, 110, 111]
    self.assertEqual(set(ports), ivre.utils.nmapspec2ports(ivre.utils.ports2nmapspec(ports)))
    self.assertEqual(ivre.utils.ports2nmapspec(ports), '1-6,80,110-111')
    ivre.config.NMAP_SHARE_PATH = './share/nmap/'
    ivre.utils.makedirs(ivre.config.NMAP_SHARE_PATH)
    with open(os.path.join(ivre.config.NMAP_SHARE_PATH, 'nmap-service-probes'), 'w') as fdesc:
        fdesc.write('Probe    TCP    NULL    q||\nmatch    test    m|^test$|\nsoftmatch    softtest    m|^softtest$|\n')
    self.assertTrue(any(((not fp[1]['soft']) for fp in ivre.utils.get_nmap_svc_fp()['fp'])))
    self.assertTrue(any((fp[1]['soft'] for fp in ivre.utils.get_nmap_svc_fp()['fp'])))
    ivre.utils.cleandir(ivre.config.NMAP_SHARE_PATH)
    def is_prime(n):
        if ((n == 2) or (n == 3)):
            return True
        if ((n < 2) or ((n % 2) == 0)):
            return False
        if (n < 9):
            return True
        if ((n % 3) == 0):
            return False
        r = int((n ** 0.5))
        f = 5
        while (f <= r):
            if ((n % f) == 0):
                return False
            if ((n % (f + 2)) == 0):
                return False
            f += 6
        return True
    for _ in range(3):
        nbr = random.randint(2, 1000)
        factors = list(ivre.mathutils.factors(nbr))
        self.assertTrue((is_prime(nbr) or (len(factors) > 1)))
        self.assertTrue(all((is_prime(x) for x in factors)))
        self.assertEqual(reduce((lambda x, y: (x * y)), factors), nbr)
