move tests

This commit is contained in:
Benjamin Bertrand 2016-01-07 19:56:30 +03:00
parent 881de6dcb1
commit 2c240eabb1
12 changed files with 28 additions and 30 deletions

View File

@ -2,9 +2,7 @@
# encoding: utf-8 # encoding: utf-8
from pymath import arithmetic from pymath.calculus import arithmetic
def test_gcd_commu(): def test_gcd_commu():
assert arithmetic.gcd(3, 15) == arithmetic.gcd(15,3) assert arithmetic.gcd(3, 15) == arithmetic.gcd(15,3)

View File

@ -4,10 +4,10 @@
""" Testing Expression """ """ Testing Expression """
from pymath.expression import Expression from pymath.calculus.expression import Expression
from pymath.fraction import Fraction from pymath.calculus.fraction import Fraction
from pymath.generic import first_elem from pymath.calculus.generic import first_elem
from pymath.render import txt, tex from pymath.calculus.render import txt, tex
def test_init_from_str(): def test_init_from_str():

View File

@ -3,10 +3,10 @@
import unittest import unittest
from pymath.fraction import Fraction from pymath.calculus.fraction import Fraction
class TestFraction(unittest.TestCase): class TestFraction(unittest.TestCase):
"""Testing functions from pymath.Fraction""" """Testing functions from pymath.calculus.Fraction"""
def setUp(self): def setUp(self):
self.listFrom = [Fraction(1,3), 1] self.listFrom = [Fraction(1,3), 1]

View File

@ -7,7 +7,7 @@ import unittest
from pymath import generic from pymath import generic
class TestGeneric(unittest.TestCase): class TestGeneric(unittest.TestCase):
"""Testing functions from pymath.generic""" """Testing functions from pymath.calculus.generic"""
def test_flatten_list1(self): def test_flatten_list1(self):
l = [1, [2,3], [[4,5], 6], 7] l = [1, [2,3], [[4,5], 6], 7]

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python #!/usr/bin/env python
# encoding: utf-8 # encoding: utf-8
from pymath.operator import op from pymath.calculus.operator import op
# Test de op.add # Test de op.add

View File

@ -4,14 +4,14 @@
import unittest import unittest
from pymath.polynom import Polynom from pymath.calculus.polynom import Polynom
from pymath.fraction import Fraction from pymath.calculus.fraction import Fraction
from pymath.expression import Expression from pymath.calculus.expression import Expression
from pymath.render import txt from pymath.calculus.render import txt
class TestPolynom(unittest.TestCase): class TestPolynom(unittest.TestCase):
"""Testing functions from pymath.polynom""" """Testing functions from pymath.calculus.polynom"""
def setup(self): def setup(self):
Expression.set_render(txt) Expression.set_render(txt)

View File

@ -4,12 +4,12 @@
import unittest import unittest
from pymath.polynomDeg2 import Polynom_deg2 from pymath.calculus.polynomDeg2 import Polynom_deg2
class TestPolynomDeg2(unittest.TestCase): class TestPolynomDeg2(unittest.TestCase):
"""Testing functions from pymath.polynomDeg2""" """Testing functions from pymath.calculus.polynomDeg2"""
pass pass

View File

@ -4,11 +4,11 @@
import unittest import unittest
from pymath.random_expression import RdExpression from pymath.calculus.random_expression import RdExpression
class TestRandomExpression(unittest.TestCase): class TestRandomExpression(unittest.TestCase):
"""Testing functions from pymath.random_expression""" """Testing functions from pymath.calculus.random_expression"""
def test_only_form(self): def test_only_form(self):
form = "{a} + 2" form = "{a} + 2"

View File

@ -4,11 +4,11 @@
import unittest import unittest
from pymath.render import tex, txt,p2i from pymath.calculus.render import tex, txt,p2i
from pymath.fraction import Fraction from pymath.calculus.fraction import Fraction
from pymath.polynom import Polynom from pymath.calculus.polynom import Polynom
from pymath.operator import op from pymath.calculus.operator import op
from pymath.expression import Expression from pymath.calculus.expression import Expression
from itertools import permutations from itertools import permutations
@ -28,7 +28,7 @@ def mass_poly_test(operation, rg= 5):
class TestTexRender(unittest.TestCase): class TestTexRender(unittest.TestCase):
"""Testing functions from pymath.renders.tex""" """Testing functions from pymath.calculus.renders.tex"""
def test_type_render_int(self): def test_type_render_int(self):
self.assertEqual(tex([2]), "2") self.assertEqual(tex([2]), "2")
@ -204,7 +204,7 @@ class TestTexRender(unittest.TestCase):
class TesttxtRender(unittest.TestCase): class TesttxtRender(unittest.TestCase):
"""Testing functions from pymath.renders.txt""" """Testing functions from pymath.calculus.renders.txt"""
def test_type_render_int(self): def test_type_render_int(self):
self.assertEqual(txt([2]), "2") self.assertEqual(txt([2]), "2")

View File

@ -4,11 +4,11 @@
import unittest import unittest
from pymath.str2tokens import str2tokens, str2in_tokens, in2post_fix from pymath.calculus.str2tokens import str2tokens, str2in_tokens, in2post_fix
from pymath.polynom import Polynom from pymath.calculus.polynom import Polynom
class TestStr2tokens(unittest.TestCase): class TestStr2tokens(unittest.TestCase):
"""Testing functions from pymath.str2tokens""" """Testing functions from pymath.calculus.str2tokens"""
def test_str2intokens(self): def test_str2intokens(self):
ans = str2in_tokens("2+3*4") ans = str2in_tokens("2+3*4")