def test_find_single_4(self):
     toolchain = toolchains.find(toolchain=['x64-linux-gcc-7'])
     self.assertTrue(toolchain)
     self.assertEqual(toolchain.id, ['x64-linux-gcc-7'])
     self.assertEqual(str(toolchain), 'x64-linux-gcc-7')
     self.assertEqual(set(toolchain.tags), {'x64-linux', 'gcc-7', 'gcc'})
     self.assertEqual(toolchain.prefix, 'x86_64-linux-gnu-')
     self.assertEqual(toolchain.env('CC'), 'x86_64-linux-gnu-gcc-7')
     self.assertEqual(toolchain.env('CCFLAGS'), None)
 def test_find_double_3(self):
     toolchain = toolchains.find(toolchain='x64-linux-gcc-7+gcc-debug')
     self.assertTrue(toolchain)
     self.assertEqual(toolchain.id, ['x64-linux-gcc-7', 'gcc-debug'])
     self.assertEqual(str(toolchain), 'x64-linux-gcc-7+gcc-debug')
     self.assertEqual(set(toolchain.tags),
                      {'x64-linux', 'gcc-7', 'gcc', 'debug'})
     self.assertEqual(toolchain.prefix, 'x86_64-linux-gnu-')
     self.assertEqual(toolchain.env('CC'), 'x86_64-linux-gnu-gcc-7')
     self.assertEqual(set(toolchain.env('CCFLAGS')), {'-g'})
 def test_find_triple_4(self):
     toolchain = toolchains.find(
         toolchain=['x64-linux-gcc-7', 'gcc-debug', 'gcc-warning-max'])
     self.assertTrue(toolchain)
     self.assertEqual(toolchain.id,
                      ['x64-linux-gcc-7', 'gcc-debug', 'gcc-warning-max'])
     self.assertEqual(str(toolchain),
                      'x64-linux-gcc-7+gcc-debug+gcc-warning-max')
     self.assertEqual(set(toolchain.tags),
                      {'x64-linux', 'gcc-7', 'gcc', 'debug', 'warning-max'})
     self.assertEqual(toolchain.prefix, 'x86_64-linux-gnu-')
     self.assertEqual(toolchain.env('CC'), 'x86_64-linux-gnu-gcc-7')
     self.assertEqual(set(toolchain.env('CCFLAGS')), {'-g', '-pedantic'})
 def test_find_fail(self):
     with self.assertRaises(toolchains.NotFoundError):
         toolchains.find('x64-linux-msvc')
     with self.assertRaises(toolchains.NotFoundError):
         toolchains.find(['x64-linux-msvc'])
     with self.assertRaises(toolchains.NotFoundError):
         toolchains.find('x64-linux-gcc-7+gcc-release')
     with self.assertRaises(toolchains.NotFoundError):
         toolchains.find('x64-linux-gcc-7', 'gcc-release')
     with self.assertRaises(toolchains.NotFoundError):
         toolchains.find(['x64-linux-gcc-7', 'gcc-release'])
     with self.assertRaises(toolchains.NotFoundError):
         toolchains.find(toolchain='x64-linux-gcc-7+gcc-release')
     with self.assertRaises(toolchains.NotFoundError):
         toolchains.find(toolchain=['x64-linux-gcc-7', 'gcc-release'])