Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Continuing to experiment with Python's unittest implementation.

  • Loading branch information...
commit 2e37c4e91515b3ed33f4a47366f0c1651c544a53 1 parent a3ea602
@johnkerl authored
View
39 T_tm.py
@@ -66,3 +66,42 @@ def from_string(value_string, params_string):
obj = T_t(0, 0)
obj.scan(value_string)
return obj
+
+
+# ================================================================
+import unittest
+if __name__ == '__main__':
+
+ class test_cases(unittest.TestCase):
+ def test___init__(self):
+ pass # to be implemented
+
+ def test___eq__(self):
+ pass # to be implemented
+
+ def test___ne__(self):
+ pass # to be implemented
+
+ def test___mul__(self):
+ pass # to be implemented
+
+ def test_inv(self):
+ pass # to be implemented
+
+ def test_scan(self):
+ pass # to be implemented
+
+ def test___str__(self):
+ pass # to be implemented
+
+ def test___repr__(self):
+ pass # to be implemented
+
+ def test_params_from_string(self):
+ pass # to be implemented
+
+ def test_from_string(self):
+ pass # to be implemented
+
+ # ----------------------------------------------------------------
+ unittest.main()
View
39 cgpalg_dense_tm.py
@@ -145,3 +145,42 @@ def __repr__(self):
# obj = cgpalg_t([1], [1])
# obj.scan(value_string, cgpalg_array)
# return obj
+
+
+# ================================================================
+import unittest
+if __name__ == '__main__':
+
+ class test_cases(unittest.TestCase):
+ def test___init__(self):
+ pass # to be implemented
+
+ def test___add__(self):
+ pass # to be implemented
+
+ def test___sub__(self):
+ pass # to be implemented
+
+ def test_index_of(self):
+ pass # to be implemented
+
+ def test___mul__(self):
+ pass # to be implemented
+
+ def test___eq__(self):
+ pass # to be implemented
+
+ def test___ne__(self):
+ pass # to be implemented
+
+ def test___neg__(self):
+ pass # to be implemented
+
+ def test___str__(self):
+ pass # to be implemented
+
+ def test___repr__(self):
+ pass # to be implemented
+
+ # ----------------------------------------------------------------
+ unittest.main()
View
51 cgpalg_tm.py
@@ -197,3 +197,54 @@ def from_pmtns_with_parity(pmtn_array):
# obj = cgpalg_t([1], [1])
# obj.scan(value_string, cgpalg_array)
# return obj
+
+
+# ================================================================
+import unittest
+if __name__ == '__main__':
+
+ class test_cases(unittest.TestCase):
+ def test___init__(self):
+ pass # to be implemented
+
+ def test_index_of(self):
+ pass # to be implemented
+
+ def test_zero_strip(self):
+ pass # to be implemented
+
+ def test_to_coef_array(self):
+ pass # to be implemented
+
+ def test___add__(self):
+ pass # to be implemented
+
+ def test___neg__(self):
+ pass # to be implemented
+
+ def test___sub__(self):
+ pass # to be implemented
+
+ def test___mul__(self):
+ pass # to be implemented
+
+ def test_inv(self):
+ pass # to be implemented
+
+ def test___div__(self):
+ pass # to be implemented
+
+ def test___str__(self):
+ pass # to be implemented
+
+ def test___repr__(self):
+ pass # to be implemented
+
+ def test_from_pmtns(self):
+ pass # to be implemented
+
+ def test_from_pmtns_with_parity(self):
+ pass # to be implemented
+
+ # ----------------------------------------------------------------
+ unittest.main()
View
51 cl2_tm.py
@@ -137,3 +137,54 @@ def from_string(value_string, params_string):
#a = cl2_t(1, 0x66, 8)
#b = cl2_t(1, 0x35, 8)
#c = a * b
+
+
+# ================================================================
+import unittest
+if __name__ == '__main__':
+
+ class test_cases(unittest.TestCase):
+ def test___init__(self):
+ pass # to be implemented
+
+ def test___mul__(self):
+ pass # to be implemented
+
+ def test___eq__(self):
+ pass # to be implemented
+
+ def test___ne__(self):
+ pass # to be implemented
+
+ def test___lt__(self):
+ pass # to be implemented
+
+ def test___le__(self):
+ pass # to be implemented
+
+ def test___gt__(self):
+ pass # to be implemented
+
+ def test___ge__(self):
+ pass # to be implemented
+
+ def test_inv(self):
+ pass # to be implemented
+
+ def test_scan(self):
+ pass # to be implemented
+
+ def test___str__(self):
+ pass # to be implemented
+
+ def test___repr__(self):
+ pass # to be implemented
+
+ def test_params_from_string(self):
+ pass # to be implemented
+
+ def test_from_string(self):
+ pass # to be implemented
+
+ # ----------------------------------------------------------------
+ unittest.main()
View
51 cl2m_tm.py
@@ -103,3 +103,54 @@ def from_string(value_string, params_string):
#a = cl2m_t(1, 0x66, 8)
#b = cl2m_t(1, 0x35, 8)
#c = a * b
+
+
+# ================================================================
+import unittest
+if __name__ == '__main__':
+
+ class test_cases(unittest.TestCase):
+ def test___init__(self):
+ pass # to be implemented
+
+ def test___mul__(self):
+ pass # to be implemented
+
+ def test___eq__(self):
+ pass # to be implemented
+
+ def test___ne__(self):
+ pass # to be implemented
+
+ def test___lt__(self):
+ pass # to be implemented
+
+ def test___le__(self):
+ pass # to be implemented
+
+ def test___gt__(self):
+ pass # to be implemented
+
+ def test___ge__(self):
+ pass # to be implemented
+
+ def test_inv(self):
+ pass # to be implemented
+
+ def test_scan(self):
+ pass # to be implemented
+
+ def test___str__(self):
+ pass # to be implemented
+
+ def test___repr__(self):
+ pass # to be implemented
+
+ def test_params_from_string(self):
+ pass # to be implemented
+
+ def test_from_string(self):
+ pass # to be implemented
+
+ # ----------------------------------------------------------------
+ unittest.main()
View
39 dih_tm.py
@@ -65,3 +65,42 @@ def from_string(value_string, params_string):
obj = dih_t(0, 0, n)
obj.scan(value_string, n)
return obj
+
+
+# ================================================================
+import unittest
+if __name__ == '__main__':
+
+ class test_cases(unittest.TestCase):
+ def test___init__(self):
+ pass # to be implemented
+
+ def test___eq__(self):
+ pass # to be implemented
+
+ def test___ne__(self):
+ pass # to be implemented
+
+ def test___mul__(self):
+ pass # to be implemented
+
+ def test_inv(self):
+ pass # to be implemented
+
+ def test_scan(self):
+ pass # to be implemented
+
+ def test___str__(self):
+ pass # to be implemented
+
+ def test___repr__(self):
+ pass # to be implemented
+
+ def test_params_from_string(self):
+ pass # to be implemented
+
+ def test_from_string(self):
+ pass # to be implemented
+
+ # ----------------------------------------------------------------
+ unittest.main()
View
32 f2poly_tm.py
@@ -406,3 +406,35 @@ def __repr__(self):
# return this->zcount_one_bits()
# else
# return this->parts[0] & 1
+
+# ================================================================
+import unittest
+if __name__ == '__main__':
+
+ class test_cases(unittest.TestCase):
+ def test_f2poly_from_string(self):
+ pass # to be implemented
+
+ def test_idegree(self):
+ pass # to be implemented
+
+ def test_imul(self):
+ pass # to be implemented
+
+ def test_iquot_and_rem(self):
+ pass # to be implemented
+
+ def test_imod(self):
+ pass # to be implemented
+
+ def test_iexp(self):
+ pass # to be implemented
+
+ def test_igcd(self):
+ pass # to be implemented
+
+ def test_iext_gcd(self):
+ pass # to be implemented
+
+ # ----------------------------------------------------------------
+ unittest.main()
View
236 f2polymod_tm.py
@@ -16,121 +16,121 @@
# xxx this is in mid-port from C++.
-# ================================================================
-def f2polymod_from_string(string):
- return f2polymod_t(int(string, 16))
-
-# ================================================================
-class f2polymod_t:
-
- #def __init__(self, resbits, modbits):
- # self.modbits = modbits
- # self.resbits = f2poly_tm.imod(resbits, modbits)
-
- # Both arguments should be of type f2poly_t.
- def __init__(self, residue, modulus):
- self.modulus = modulus
- self.residue = residue % modulus
-
- def __add__(a,b):
- c = f2polymod_t(a.residue + b.residue, a.modulus)
- return c
- def __sub__(a,b):
- c = f2polymod_t(a.residue - b.residue, a.modulus)
- return c
- def __mul__(a,b):
- c = f2polymod_t(a.residue * b.residue, a.modulus)
- return c
-
- # xxx fix me
- def recip(a):
- pass
-
-#int f2polymod_t::recip(f2polymod_t & rinv)
-# f2poly_t g, a, b;
-# g = this->residue.ext_gcd(this->modulus, a, b);
-#
-# if (g.find_degree() != 0): # Error check
-# //std::cerr << "f2polymod recip: zero or zero divisor.";
-# return 0
-# else:
-# rinv = f2polymod_t(a, this->modulus)
-# return 1
-
- def __div__(a,b):
- return a * b.recip()
-
- # xxx fix me
- def __pow__(a, e):
- ap = a.residue
- one = f2poly_t(1)
- rv = one
-
- xxx types
- if (e == 0):
- if (a.residue.bits == 0):
- print >> sys.stderr, "f2polymod_t.exp: 0^0 undefined."
- sys.exit(1)
- return one
- elif (e < 0):
- if (a.residue.bits == 0):
- print >> sys.stderr, "f2polymod_t.exp: division by zero."
- sys.exit(1)
-
- xxx
- f2polymod_t inv = one/ *this
- xp = inv.residue
- e = -e
-
- while (e != 0):
- if e & 1:
- rv.residue = (rv.residue * xp) % this->modulus
- e >>= 1
- xp = (xp * xp) % this->modulus
- return rv
-
-
- def __eq__(a,b):
- return a.bits == b.bits
- def __ne__(a,b):
- return not (a == b)
- def __neg__(a):
- return a
-
- def scan(self, string):
- self.bits = int(string, 16)
-
- def __str__(self):
- # xxx temp
- return self.residue.__str__()
- #return "%x" % self.bits
- def __repr__(self):
- return self.__str__()
-
-
-#std::ostream & operator<<(std::ostream & os, const f2polymod_t & a)
-# a.residue.dprint(os, a.modulus.find_degree() - 1)
-#
-#int f2polymod_t::from_string(char * string, f2poly_t m)
-# f2poly_t r;
-# std::istringstream iss(string, std::ios_base::in);
-# iss >> r;
-# if (iss.fail()) {
-# return 0;
-# }
-# else {
-# *this = f2polymod_t(r, m);
-# return 1;
-# }
-#
-#void f2polymod_t::check_moduli(f2polymod_t & that) const
-# if (this->modulus != that.modulus) {
-# std::cerr
-# << "f2polymod_t: mixed moduli "
-# << this->modulus
-# << ", "
-# << that.modulus
-# << ".";
-# std::cerr << std::endl;
-# exit(1);
-# }
+## ================================================================
+#def f2polymod_from_string(string):
+# return f2polymod_t(int(string, 16))
+#
+## ================================================================
+#class f2polymod_t:
+#
+# #def __init__(self, resbits, modbits):
+# # self.modbits = modbits
+# # self.resbits = f2poly_tm.imod(resbits, modbits)
+#
+# # Both arguments should be of type f2poly_t.
+# def __init__(self, residue, modulus):
+# self.modulus = modulus
+# self.residue = residue % modulus
+#
+# def __add__(a,b):
+# c = f2polymod_t(a.residue + b.residue, a.modulus)
+# return c
+# def __sub__(a,b):
+# c = f2polymod_t(a.residue - b.residue, a.modulus)
+# return c
+# def __mul__(a,b):
+# c = f2polymod_t(a.residue * b.residue, a.modulus)
+# return c
+#
+# # xxx fix me
+# def recip(a):
+# pass
+#
+##int f2polymod_t::recip(f2polymod_t & rinv)
+## f2poly_t g, a, b;
+## g = this->residue.ext_gcd(this->modulus, a, b);
+##
+## if (g.find_degree() != 0): # Error check
+## //std::cerr << "f2polymod recip: zero or zero divisor.";
+## return 0
+## else:
+## rinv = f2polymod_t(a, this->modulus)
+## return 1
+#
+# def __div__(a,b):
+# return a * b.recip()
+#
+# # xxx fix me
+# def __pow__(a, e):
+# ap = a.residue
+# one = f2poly_t(1)
+# rv = one
+#
+# #xxx types
+# if (e == 0):
+# if (a.residue.bits == 0):
+# print >> sys.stderr, "f2polymod_t.exp: 0^0 undefined."
+# sys.exit(1)
+# return one
+# elif (e < 0):
+# if (a.residue.bits == 0):
+# print >> sys.stderr, "f2polymod_t.exp: division by zero."
+# sys.exit(1)
+#
+# #xxx
+# f2polymod_t inv = one/ *this
+# xp = inv.residue
+# e = -e
+#
+# while (e != 0):
+# if e & 1:
+# rv.residue = (rv.residue * xp) % this->modulus
+# e >>= 1
+# xp = (xp * xp) % this->modulus
+# return rv
+#
+#
+# def __eq__(a,b):
+# return a.bits == b.bits
+# def __ne__(a,b):
+# return not (a == b)
+# def __neg__(a):
+# return a
+#
+# def scan(self, string):
+# self.bits = int(string, 16)
+#
+# def __str__(self):
+# # xxx temp
+# return self.residue.__str__()
+# #return "%x" % self.bits
+# def __repr__(self):
+# return self.__str__()
+#
+#
+##std::ostream & operator<<(std::ostream & os, const f2polymod_t & a)
+## a.residue.dprint(os, a.modulus.find_degree() - 1)
+##
+##int f2polymod_t::from_string(char * string, f2poly_t m)
+## f2poly_t r;
+## std::istringstream iss(string, std::ios_base::in);
+## iss >> r;
+## if (iss.fail()) {
+## return 0;
+## }
+## else {
+## *this = f2polymod_t(r, m);
+## return 1;
+## }
+##
+##void f2polymod_t::check_moduli(f2polymod_t & that) const
+## if (this->modulus != that.modulus) {
+## std::cerr
+## << "f2polymod_t: mixed moduli "
+## << this->modulus
+## << ", "
+## << that.modulus
+## << ".";
+## std::cerr << std::endl;
+## exit(1);
+## }
View
39 genquat_tm.py
@@ -120,3 +120,42 @@ def from_string(value_string, params_string):
obj = genquat_t(0, 0, n)
obj.scan(value_string, n)
return obj
+
+
+# ================================================================
+import unittest
+if __name__ == '__main__':
+
+ class test_cases(unittest.TestCase):
+ def test___init__(self):
+ pass # to be implemented
+
+ def test___eq__(self):
+ pass # to be implemented
+
+ def test___ne__(self):
+ pass # to be implemented
+
+ def test___mul__(self):
+ pass # to be implemented
+
+ def test_inv(self):
+ pass # to be implemented
+
+ def test_scan(self):
+ pass # to be implemented
+
+ def test___str__(self):
+ pass # to be implemented
+
+ def test___repr__(self):
+ pass # to be implemented
+
+ def test_params_from_string(self):
+ pass # to be implemented
+
+ def test_from_string(self):
+ pass # to be implemented
+
+ # ----------------------------------------------------------------
+ unittest.main()
View
48 gint_tm.py
@@ -122,3 +122,51 @@ def __repr__(self):
print a, b, q, r
a = b
b = r
+
+
+# ================================================================
+import unittest
+if __name__ == '__main__':
+
+ class test_cases(unittest.TestCase):
+ def test___init__(self):
+ pass # to be implemented
+
+ def test___eq__(self):
+ pass # to be implemented
+
+ def test___ne__(self):
+ pass # to be implemented
+
+ def test___add__(self):
+ pass # to be implemented
+
+ def test___sub__(self):
+ pass # to be implemented
+
+ def test___mul__(self):
+ pass # to be implemented
+
+ def test___div__(self):
+ pass # to be implemented
+
+ def test___mod__(self):
+ pass # to be implemented
+
+ def test_conj(self):
+ pass # to be implemented
+
+ def test_norm(self):
+ pass # to be implemented
+
+ def test_scan(self):
+ pass # to be implemented
+
+ def test___str__(self):
+ pass # to be implemented
+
+ def test___repr__(self):
+ pass # to be implemented
+
+ # ----------------------------------------------------------------
+ unittest.main()
View
53 ispec_tm.py
@@ -80,3 +80,56 @@ def install_table(table):
if (z.code == e.code):
ispec_tbl.ispec_inv_table.append(j)
continue
+
+# ================================================================
+import unittest
+if __name__ == '__main__':
+
+ class test_cases(unittest.TestCase):
+ def test___init__(self):
+ pass # to be implemented
+
+ def test___mul__(self):
+ pass # to be implemented
+
+ def test___eq__(self):
+ pass # to be implemented
+
+ def test___ne__(self):
+ pass # to be implemented
+
+ def test___lt__(self):
+ pass # to be implemented
+
+ def test___le__(self):
+ pass # to be implemented
+
+ def test___gt__(self):
+ pass # to be implemented
+
+ def test___ge__(self):
+ pass # to be implemented
+
+ def test_inv(self):
+ pass # to be implemented
+
+ def test_scan(self):
+ pass # to be implemented
+
+ def test___str__(self):
+ pass # to be implemented
+
+ def test___repr__(self):
+ pass # to be implemented
+
+ def test_params_from_string(self):
+ pass # to be implemented
+
+ def test_from_string(self):
+ pass # to be implemented
+
+ def test_install_table(self):
+ pass # to be implemented
+
+ # ----------------------------------------------------------------
+ unittest.main()
View
42 metacyc_tm.py
@@ -181,3 +181,45 @@ def from_string(value_string, params_string):
obj = metacyc_t(0, 0, p, q, t)
obj.scan(value_string, p, q, t)
return obj
+
+
+# ================================================================
+import unittest
+if __name__ == '__main__':
+
+ class test_cases(unittest.TestCase):
+ def test_find_t(self):
+ pass # to be implemented
+
+ def test___init__(self):
+ pass # to be implemented
+
+ def test___eq__(self):
+ pass # to be implemented
+
+ def test___ne__(self):
+ pass # to be implemented
+
+ def test___mul__(self):
+ pass # to be implemented
+
+ def test_inv(self):
+ pass # to be implemented
+
+ def test_scan(self):
+ pass # to be implemented
+
+ def test___str__(self):
+ pass # to be implemented
+
+ def test___repr__(self):
+ pass # to be implemented
+
+ def test_params_from_string(self):
+ pass # to be implemented
+
+ def test_from_string(self):
+ pass # to be implemented
+
+ # ----------------------------------------------------------------
+ unittest.main()
View
27 mktestskel
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+# ================================================================
+# Given a Python module, prints a unit-test skeleton.
+# John Kerl 2012-08-06
+# ================================================================
+
+cat <<_EOF
+
+# ================================================================
+import unittest
+if __name__ == '__main__':
+
+ class test_cases(unittest.TestCase):
+_EOF
+
+names=$(grep -P '^\s*def.*:$' "$@" | grep -w def | sed -e 's/def *//' -e 's/(.*//')
+for name in $names; do
+ echo -e "\t\tdef test_$name(self):"
+ echo -e "\t\t\tpass # to be implemented"
+ echo ""
+done
+
+cat <<_EOF
+ # ----------------------------------------------------------------
+ unittest.main()
+_EOF
View
63 mod_tm.py
@@ -209,3 +209,66 @@ def from_string(value_string, params_string):
## obj = mod_t([1], [1])
## obj.scan(value_string, params_string)
## return obj
+
+
+# ================================================================
+import unittest
+if __name__ == '__main__':
+
+ class test_cases(unittest.TestCase):
+ def test___init__(self):
+ pass # to be implemented
+
+ def test___add__(self):
+ pass # to be implemented
+
+ def test___sub__(self):
+ pass # to be implemented
+
+ def test___add__(self):
+ pass # to be implemented
+
+ def test___mul__(self):
+ pass # to be implemented
+
+ def test___eq__(self):
+ pass # to be implemented
+
+ def test___ne__(self):
+ pass # to be implemented
+
+ def test___neg__(self):
+ pass # to be implemented
+
+ def test_inv(self):
+ pass # to be implemented
+
+ def test_scan(self):
+ pass # to be implemented
+
+ def test___str__(self):
+ pass # to be implemented
+
+ def test___repr__(self):
+ pass # to be implemented
+
+ def test_check_length(self):
+ pass # to be implemented
+
+ def test_check_lengths(self):
+ pass # to be implemented
+
+ def test_check_moduli(self):
+ pass # to be implemented
+
+ def test_check_moduli_pair(self):
+ pass # to be implemented
+
+ def test_params_from_string(self):
+ pass # to be implemented
+
+ def test_from_string(self):
+ pass # to be implemented
+
+ # ----------------------------------------------------------------
+ unittest.main()
View
51 modadd_tm.py
@@ -108,3 +108,54 @@ def from_string(value_string, params_string):
obj = modadd_t([1], [1])
obj.scan(value_string, mod_array)
return obj
+
+
+# ================================================================
+import unittest
+if __name__ == '__main__':
+
+ class test_cases(unittest.TestCase):
+ def test___init__(self):
+ pass # to be implemented
+
+ def test___mul__(self):
+ pass # to be implemented
+
+ def test___eq__(self):
+ pass # to be implemented
+
+ def test___ne__(self):
+ pass # to be implemented
+
+ def test_inv(self):
+ pass # to be implemented
+
+ def test_scan(self):
+ pass # to be implemented
+
+ def test___str__(self):
+ pass # to be implemented
+
+ def test___repr__(self):
+ pass # to be implemented
+
+ def test_check_length(self):
+ pass # to be implemented
+
+ def test_check_lengths(self):
+ pass # to be implemented
+
+ def test_check_moduli(self):
+ pass # to be implemented
+
+ def test_check_moduli_pair(self):
+ pass # to be implemented
+
+ def test_params_from_string(self):
+ pass # to be implemented
+
+ def test_from_string(self):
+ pass # to be implemented
+
+ # ----------------------------------------------------------------
+ unittest.main()
View
60 modmul_tm.py
@@ -131,3 +131,63 @@ def from_string(value_string, params_string):
obj = modmul_t([1], [1])
obj.scan(value_string, params_string)
return obj
+
+
+# ================================================================
+import unittest
+if __name__ == '__main__':
+
+ class test_cases(unittest.TestCase):
+ def test___init__(self):
+ pass # to be implemented
+
+ def test___eq__(self):
+ pass # to be implemented
+
+ def test___ne__(self):
+ pass # to be implemented
+
+ def test___mul__(self):
+ pass # to be implemented
+
+ def test_inv(self):
+ pass # to be implemented
+
+ def test___add__(self):
+ pass # to be implemented
+
+ def test___sub__(self):
+ pass # to be implemented
+
+ def test_neg(self):
+ pass # to be implemented
+
+ def test_scan(self):
+ pass # to be implemented
+
+ def test___str__(self):
+ pass # to be implemented
+
+ def test___repr__(self):
+ pass # to be implemented
+
+ def test_check_length(self):
+ pass # to be implemented
+
+ def test_check_lengths(self):
+ pass # to be implemented
+
+ def test_check_moduli(self):
+ pass # to be implemented
+
+ def test_check_moduli_pair(self):
+ pass # to be implemented
+
+ def test_params_from_string(self):
+ pass # to be implemented
+
+ def test_from_string(self):
+ pass # to be implemented
+
+ # ----------------------------------------------------------------
+ unittest.main()
View
57 pauli_tm.py
@@ -146,3 +146,60 @@ def from_string(value_string, params_string):
#n = len(G)
#for k in range(0, n):
# print G[k], orders[k]
+
+
+# ================================================================
+import unittest
+if __name__ == '__main__':
+
+ class test_cases(unittest.TestCase):
+ def test_sanitize1(self):
+ pass # to be implemented
+
+ def test_sanitize(self):
+ pass # to be implemented
+
+ def test___init__(self):
+ pass # to be implemented
+
+ def test___mul__(self):
+ pass # to be implemented
+
+ def test___eq__(self):
+ pass # to be implemented
+
+ def test___ne__(self):
+ pass # to be implemented
+
+ def test___lt__(self):
+ pass # to be implemented
+
+ def test___le__(self):
+ pass # to be implemented
+
+ def test___gt__(self):
+ pass # to be implemented
+
+ def test___ge__(self):
+ pass # to be implemented
+
+ def test_inv(self):
+ pass # to be implemented
+
+ def test_scan(self):
+ pass # to be implemented
+
+ def test___str__(self):
+ pass # to be implemented
+
+ def test___repr__(self):
+ pass # to be implemented
+
+ def test_params_from_string(self):
+ pass # to be implemented
+
+ def test_from_string(self):
+ pass # to be implemented
+
+ # ----------------------------------------------------------------
+ unittest.main()
View
2  pmtc_tm.py
@@ -23,7 +23,6 @@
import re, copy, sys, random
import sackint
-import unittest
# ================================================================
class pmtc_t:
@@ -611,6 +610,7 @@ def sort_pmtcs(list):
list[i] = pairs[i][0]
# ================================================================
+import unittest
if __name__ == '__main__':
# ----------------------------------------------------------------
View
111 pmti_tm.py
@@ -532,3 +532,114 @@ def sort_pmtis(list):
for i in range(0, m):
list[i] = pairs[i][0]
+
+
+# ================================================================
+import unittest
+if __name__ == '__main__':
+
+ class test_cases(unittest.TestCase):
+ def test___init__(self):
+ pass # to be implemented
+
+ def test___eq__(self):
+ pass # to be implemented
+
+ def test___ne__(self):
+ pass # to be implemented
+
+ def test___cmp__(self):
+ pass # to be implemented
+
+ def test___mul__(self):
+ pass # to be implemented
+
+ def test_check_permutation(self):
+ pass # to be implemented
+
+ def test_inv(self):
+ pass # to be implemented
+
+ def test_scan(self):
+ pass # to be implemented
+
+ def test_cycle_fill(self):
+ pass # to be implemented
+
+ def test___str__(self):
+ pass # to be implemented
+
+ def test___repr__(self):
+ pass # to be implemented
+
+ def test___getitem__(self):
+ pass # to be implemented
+
+ def test_of(self):
+ pass # to be implemented
+
+ def test_inv_img(self):
+ pass # to be implemented
+
+ def test_sgn(self):
+ pass # to be implemented
+
+ def test_parity(self):
+ pass # to be implemented
+
+ def test_oldparity(self):
+ pass # to be implemented
+
+ def test_oldsgn(self):
+ pass # to be implemented
+
+ def test_cycle_decomposition(self):
+ pass # to be implemented
+
+ def test_cycle_decomposition_non_triv(self):
+ pass # to be implemented
+
+ def test_cycle_type(self):
+ pass # to be implemented
+
+ def test_cycle_counts(self):
+ pass # to be implemented
+
+ def test_transposition_decomposition(self):
+ pass # to be implemented
+
+ def test_from_cycles(self):
+ pass # to be implemented
+
+ def test_from_cycle(self):
+ pass # to be implemented
+
+ def test_from_cycle_type(self):
+ pass # to be implemented
+
+ def test_cycle_type_reps(self):
+ pass # to be implemented
+
+ def test_params_from_string(self):
+ pass # to be implemented
+
+ def test_from_string(self):
+ pass # to be implemented
+
+ def test_identity_pmti(self):
+ pass # to be implemented
+
+ def test_kth_pmti(self):
+ pass # to be implemented
+
+ def test_rand_pmti(self):
+ pass # to be implemented
+
+ def test_pmti_cmp(self):
+ pass # to be implemented
+
+ def test_sort_pmtis(self):
+ pass # to be implemented
+
+ # ----------------------------------------------------------------
+ unittest.main()
View
51 quatu_tm.py
@@ -124,3 +124,54 @@ def from_string(value_string, params_string):
# z = x * y
# print x, y, z
# print
+
+
+# ================================================================
+import unittest
+if __name__ == '__main__':
+
+ class test_cases(unittest.TestCase):
+ def test___init__(self):
+ pass # to be implemented
+
+ def test___mul__(self):
+ pass # to be implemented
+
+ def test___eq__(self):
+ pass # to be implemented
+
+ def test___ne__(self):
+ pass # to be implemented
+
+ def test___lt__(self):
+ pass # to be implemented
+
+ def test___le__(self):
+ pass # to be implemented
+
+ def test___gt__(self):
+ pass # to be implemented
+
+ def test___ge__(self):
+ pass # to be implemented
+
+ def test_inv(self):
+ pass # to be implemented
+
+ def test_scan(self):
+ pass # to be implemented
+
+ def test___str__(self):
+ pass # to be implemented
+
+ def test___repr__(self):
+ pass # to be implemented
+
+ def test_params_from_string(self):
+ pass # to be implemented
+
+ def test_from_string(self):
+ pass # to be implemented
+
+ # ----------------------------------------------------------------
+ unittest.main()
View
60 spec_tm.py
@@ -114,3 +114,63 @@ def install_table(cayley_table_with_names):
if (z.code == e.code):
spec_tables.inv_table.append(j)
continue
+
+
+# ================================================================
+import unittest
+if __name__ == '__main__':
+
+ class test_cases(unittest.TestCase):
+ def test_name_to_index(self):
+ pass # to be implemented
+
+ def test_name_to_index_or_die(self):
+ pass # to be implemented
+
+ def test___init__(self):
+ pass # to be implemented
+
+ def test___mul__(self):
+ pass # to be implemented
+
+ def test___eq__(self):
+ pass # to be implemented
+
+ def test___ne__(self):
+ pass # to be implemented
+
+ def test___lt__(self):
+ pass # to be implemented
+
+ def test___le__(self):
+ pass # to be implemented
+
+ def test___gt__(self):
+ pass # to be implemented
+
+ def test___ge__(self):
+ pass # to be implemented
+
+ def test_inv(self):
+ pass # to be implemented
+
+ def test_scan(self):
+ pass # to be implemented
+
+ def test___str__(self):
+ pass # to be implemented
+
+ def test___repr__(self):
+ pass # to be implemented
+
+ def test_params_from_string(self):
+ pass # to be implemented
+
+ def test_from_string(self):
+ pass # to be implemented
+
+ def test_install_table(self):
+ pass # to be implemented
+
+ # ----------------------------------------------------------------
+ unittest.main()
View
39 v4_tm.py
@@ -95,3 +95,42 @@ def from_string(value_string, params_string):
# z = x * y
# print x, y, z
# print
+
+
+# ================================================================
+import unittest
+if __name__ == '__main__':
+
+ class test_cases(unittest.TestCase):
+ def test___init__(self):
+ pass # to be implemented
+
+ def test___eq__(self):
+ pass # to be implemented
+
+ def test___ne__(self):
+ pass # to be implemented
+
+ def test___mul__(self):
+ pass # to be implemented
+
+ def test_inv(self):
+ pass # to be implemented
+
+ def test_scan(self):
+ pass # to be implemented
+
+ def test___str__(self):
+ pass # to be implemented
+
+ def test___repr__(self):
+ pass # to be implemented
+
+ def test_params_from_string(self):
+ pass # to be implemented
+
+ def test_from_string(self):
+ pass # to be implemented
+
+ # ----------------------------------------------------------------
+ unittest.main()
Please sign in to comment.
Something went wrong with that request. Please try again.