def test_phonon_dispersion(self):
    ' Test phonon dispersion plot. '
    os.chdir((REAL_PATH + '/data/phonon_dispersion'))
    expected_file = 'K3P_spectral.png'
    if os.path.isfile(expected_file):
        os.remove(expected_file)
    sys.argv = ['dispersion', 'K3P', '--png', '-ph', '--colours', 'grey', 'green', 'blue', '--figsize', '10', '10']
    errored = False
    try:
        matador.cli.dispersion.main()
    except Exception as exc:
        errored = True
        error = exc
    file_exists = os.path.isfile(expected_file)
    if file_exists:
        os.remove(expected_file)
    os.chdir(ROOT_DIR)
    if errored:
        raise error
    self.assertTrue(file_exists)
Test phonon dispersion plot.
def test_phonon_dispersion(self):
    '  '
    os.chdir((REAL_PATH + '/data/phonon_dispersion'))
    expected_file = 'K3P_spectral.png'
    if os.path.isfile(expected_file):
        os.remove(expected_file)
    sys.argv = ['dispersion', 'K3P', '--png', '-ph', '--colours', 'grey', 'green', 'blue', '--figsize', '10', '10']
    errored = False
    try:
        matador.cli.dispersion.main()
    except Exception as exc:
        errored = True
        error = exc
    file_exists = os.path.isfile(expected_file)
    if file_exists:
        os.remove(expected_file)
    os.chdir(ROOT_DIR)
    if errored:
        raise error
    self.assertTrue(file_exists)