move tests
This commit is contained in:
parent
881de6dcb1
commit
2c240eabb1
@ -2,9 +2,7 @@
|
||||
# encoding: utf-8
|
||||
|
||||
|
||||
from pymath import arithmetic
|
||||
|
||||
|
||||
from pymath.calculus import arithmetic
|
||||
|
||||
def test_gcd_commu():
|
||||
assert arithmetic.gcd(3, 15) == arithmetic.gcd(15,3)
|
@ -4,10 +4,10 @@
|
||||
""" Testing Expression """
|
||||
|
||||
|
||||
from pymath.expression import Expression
|
||||
from pymath.fraction import Fraction
|
||||
from pymath.generic import first_elem
|
||||
from pymath.render import txt, tex
|
||||
from pymath.calculus.expression import Expression
|
||||
from pymath.calculus.fraction import Fraction
|
||||
from pymath.calculus.generic import first_elem
|
||||
from pymath.calculus.render import txt, tex
|
||||
|
||||
|
||||
def test_init_from_str():
|
@ -3,10 +3,10 @@
|
||||
|
||||
import unittest
|
||||
|
||||
from pymath.fraction import Fraction
|
||||
from pymath.calculus.fraction import Fraction
|
||||
|
||||
class TestFraction(unittest.TestCase):
|
||||
"""Testing functions from pymath.Fraction"""
|
||||
"""Testing functions from pymath.calculus.Fraction"""
|
||||
|
||||
def setUp(self):
|
||||
self.listFrom = [Fraction(1,3), 1]
|
@ -7,7 +7,7 @@ import unittest
|
||||
from pymath import generic
|
||||
|
||||
class TestGeneric(unittest.TestCase):
|
||||
"""Testing functions from pymath.generic"""
|
||||
"""Testing functions from pymath.calculus.generic"""
|
||||
|
||||
def test_flatten_list1(self):
|
||||
l = [1, [2,3], [[4,5], 6], 7]
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python
|
||||
# encoding: utf-8
|
||||
|
||||
from pymath.operator import op
|
||||
from pymath.calculus.operator import op
|
||||
|
||||
|
||||
# Test de op.add
|
@ -4,14 +4,14 @@
|
||||
|
||||
import unittest
|
||||
|
||||
from pymath.polynom import Polynom
|
||||
from pymath.fraction import Fraction
|
||||
from pymath.expression import Expression
|
||||
from pymath.render import txt
|
||||
from pymath.calculus.polynom import Polynom
|
||||
from pymath.calculus.fraction import Fraction
|
||||
from pymath.calculus.expression import Expression
|
||||
from pymath.calculus.render import txt
|
||||
|
||||
|
||||
class TestPolynom(unittest.TestCase):
|
||||
"""Testing functions from pymath.polynom"""
|
||||
"""Testing functions from pymath.calculus.polynom"""
|
||||
|
||||
def setup(self):
|
||||
Expression.set_render(txt)
|
@ -4,12 +4,12 @@
|
||||
|
||||
import unittest
|
||||
|
||||
from pymath.polynomDeg2 import Polynom_deg2
|
||||
from pymath.calculus.polynomDeg2 import Polynom_deg2
|
||||
|
||||
|
||||
|
||||
class TestPolynomDeg2(unittest.TestCase):
|
||||
"""Testing functions from pymath.polynomDeg2"""
|
||||
"""Testing functions from pymath.calculus.polynomDeg2"""
|
||||
|
||||
pass
|
||||
|
@ -4,11 +4,11 @@
|
||||
|
||||
import unittest
|
||||
|
||||
from pymath.random_expression import RdExpression
|
||||
from pymath.calculus.random_expression import RdExpression
|
||||
|
||||
|
||||
class TestRandomExpression(unittest.TestCase):
|
||||
"""Testing functions from pymath.random_expression"""
|
||||
"""Testing functions from pymath.calculus.random_expression"""
|
||||
|
||||
def test_only_form(self):
|
||||
form = "{a} + 2"
|
@ -4,11 +4,11 @@
|
||||
|
||||
import unittest
|
||||
|
||||
from pymath.render import tex, txt,p2i
|
||||
from pymath.fraction import Fraction
|
||||
from pymath.polynom import Polynom
|
||||
from pymath.operator import op
|
||||
from pymath.expression import Expression
|
||||
from pymath.calculus.render import tex, txt,p2i
|
||||
from pymath.calculus.fraction import Fraction
|
||||
from pymath.calculus.polynom import Polynom
|
||||
from pymath.calculus.operator import op
|
||||
from pymath.calculus.expression import Expression
|
||||
|
||||
from itertools import permutations
|
||||
|
||||
@ -28,7 +28,7 @@ def mass_poly_test(operation, rg= 5):
|
||||
|
||||
|
||||
class TestTexRender(unittest.TestCase):
|
||||
"""Testing functions from pymath.renders.tex"""
|
||||
"""Testing functions from pymath.calculus.renders.tex"""
|
||||
|
||||
def test_type_render_int(self):
|
||||
self.assertEqual(tex([2]), "2")
|
||||
@ -204,7 +204,7 @@ class TestTexRender(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):
|
||||
self.assertEqual(txt([2]), "2")
|
@ -4,11 +4,11 @@
|
||||
|
||||
import unittest
|
||||
|
||||
from pymath.str2tokens import str2tokens, str2in_tokens, in2post_fix
|
||||
from pymath.polynom import Polynom
|
||||
from pymath.calculus.str2tokens import str2tokens, str2in_tokens, in2post_fix
|
||||
from pymath.calculus.polynom import Polynom
|
||||
|
||||
class TestStr2tokens(unittest.TestCase):
|
||||
"""Testing functions from pymath.str2tokens"""
|
||||
"""Testing functions from pymath.calculus.str2tokens"""
|
||||
|
||||
def test_str2intokens(self):
|
||||
ans = str2in_tokens("2+3*4")
|
Loading…
Reference in New Issue
Block a user