@@ -0,0 +1,1410 @@
+import unittest%0Aimport subprocess%0Aimport tempfile%0A%0Aimport fuchsia%0Afrom   sage.all import SR%0A%0Adef sh(*cmd):%0A    p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)%0A    stdout, stderr = p.communicate()%0A    if p.returncode != 0:%0A        raise Exception(%22Command %25s exited with code %25s%22 %25 (cmd, p.returncode))%0A    return stdout, stderr%0A%0Aclass Test(unittest.TestCase):%0A    def test_help(t):%0A        sh(%22bin/fuchsia%22, %22-h%22)%0A%0A    def assertTransformation(t, m1_path, x_name, t_path, m2_path):%0A        M1 = fuchsia.import_matrix_from_file(m1_path)%0A        T = fuchsia.import_matrix_from_file(t_path)%0A        M2 = fuchsia.import_matrix_from_file(m2_path)%0A        t.assertEqual(M2.simplify_rational(),%0A                fuchsia.transform(M1, SR.var(x_name), T).simplify_rational())%0A%0A    def assertIsFuchsian(t, m_path, x_name):%0A        M = fuchsia.import_matrix_from_file(m_path)%0A        x = SR.var(x_name)%0A        pranks = fuchsia.singularities(M, x).values()%0A        t.assertEqual(pranks, %5B0%5D*len(pranks))%0A%0A    def test_fuchsify_1(t):%0A        with tempfile.NamedTemporaryFile() as mf:%0A            with tempfile.NamedTemporaryFile() as tf:%0A                sh(%22bin/fuchsia%22, %22fuchsify%22, %22-m%22, mf.name, %22-t%22, tf.name,%0A                        %22examples/git_409.mtx%22)%0A                t.assertTransformation(%22examples/git_409.mtx%22, %22x%22, tf.name, mf.name)%0A                t.assertIsFuchsian(mf.name, %22x%22)%0A

Add a simple CLI test