@unittest.skipIf((not TERNARY_PRESENT), 'Skipping as python-ternary not found')
def test_ternary_hull_plot(self):
    ' Test plotting ternary hull. '
    expected_files = ['KSnP_hull.png', 'KSnP_voltage.png']
    for expected_file in expected_files:
        if os.path.isfile(expected_file):
            os.remove(expected_file)
    res_list = glob((REAL_PATH + 'data/hull-KPSn-KP/*.res'))
    self.assertEqual(len(res_list), 87, 'Could not find test res files, please check installation...')
    cursor = [res2dict(res)[0] for res in res_list]
    QueryConvexHull(cursor=cursor, elements=['K', 'Sn', 'P'], no_plot=False, png=True, quiet=False, voltage=True, labels=True, label_cutoff=0.05, hull_cutoff=0.1, capmap=True)
    self.assertTrue(os.path.isfile(expected_file))
    for expected_file in expected_files:
        os.remove(expected_file)
Test plotting ternary hull.
@unittest.skipIf((not TERNARY_PRESENT), 'Skipping as python-ternary not found')
def test_ternary_hull_plot(self):
    '  '
    expected_files = ['KSnP_hull.png', 'KSnP_voltage.png']
    for expected_file in expected_files:
        if os.path.isfile(expected_file):
            os.remove(expected_file)
    res_list = glob((REAL_PATH + 'data/hull-KPSn-KP/*.res'))
    self.assertEqual(len(res_list), 87, 'Could not find test res files, please check installation...')
    cursor = [res2dict(res)[0] for res in res_list]
    QueryConvexHull(cursor=cursor, elements=['K', 'Sn', 'P'], no_plot=False, png=True, quiet=False, voltage=True, labels=True, label_cutoff=0.05, hull_cutoff=0.1, capmap=True)
    self.assertTrue(os.path.isfile(expected_file))
    for expected_file in expected_files:
        os.remove(expected_file)