Test optional dependencies only if installed #276

Merged
merged 1 commit into from Oct 17, 2015

Conversation

Projects
None yet
2 participants
@oliverlee
Contributor

oliverlee commented Oct 17, 2015

This commit resolves issue #52.

@oliverlee

This comment has been minimized.

Show comment
Hide comment
@oliverlee

oliverlee Oct 17, 2015

Contributor
(dev)oliver@enif:~/repos/pydy$ nosetests -v pydy/codegen/tests/test_code.py:TestCode.test_generate_ode_function
/home/oliver/repos/pydy/pydy/codegen/code.py:25: PyDyDeprecationWarning: This module, 'pydy.codgen.code', is deprecated. The function 'generate_ode_function' can be found in the 'pydy.codegen.ode_function_generator' module. 'CythonGenerator' has been removed, use 'pydy.codegen.cython_code.CythonMatrixGenerator' instead.
  PyDyDeprecationWarning)
pydy.codegen.tests.test_code.TestCode.test_generate_ode_function ... /home/oliver/repos/pydy/pydy/codegen/code.py:71: PyDyDeprecationWarning: This function is deprecated and will be removed in PyDy 0.4.0. Use the the new 'generate_ode_function' in 'pydy.codegen.ode_function_generator'
  PyDyDeprecationWarning)
/home/oliver/repos/pydy/pydy/codegen/ode_function_generators.py:397: PyDyDeprecationWarning: The old style args, i.e. {'constants': , 'specified'}, for the generated function will be removed in PyDy 0.4.0.
  PyDyDeprecationWarning)
/home/oliver/repos/pydy/pydy/codegen/code.py:71: PyDyDeprecationWarning: This function is deprecated and will be removed in PyDy 0.4.0. Use the the new 'generate_ode_function' in 'pydy.codegen.ode_function_generator'
  PyDyDeprecationWarning)
/home/oliver/repos/pydy/pydy/codegen/ode_function_generators.py:397: PyDyDeprecationWarning: The old style args, i.e. {'constants': , 'specified'}, for the generated function will be removed in PyDy 0.4.0.
  PyDyDeprecationWarning)
/home/oliver/repos/pydy/pydy/codegen/code.py:71: PyDyDeprecationWarning: This function is deprecated and will be removed in PyDy 0.4.0. Use the the new 'generate_ode_function' in 'pydy.codegen.ode_function_generator'
  PyDyDeprecationWarning)
/home/oliver/repos/pydy/pydy/codegen/ode_function_generators.py:397: PyDyDeprecationWarning: The old style args, i.e. {'constants': , 'specified'}, for the generated function will be removed in PyDy 0.4.0.
  PyDyDeprecationWarning)
/home/oliver/repos/pydy/pydy/codegen/code.py:71: PyDyDeprecationWarning: This function is deprecated and will be removed in PyDy 0.4.0. Use the the new 'generate_ode_function' in 'pydy.codegen.ode_function_generator'
  PyDyDeprecationWarning)
/home/oliver/repos/pydy/pydy/codegen/ode_function_generators.py:397: PyDyDeprecationWarning: The old style args, i.e. {'constants': , 'specified'}, for the generated function will be removed in PyDy 0.4.0.
  PyDyDeprecationWarning)
/home/oliver/repos/pydy/pydy/codegen/code.py:71: PyDyDeprecationWarning: This function is deprecated and will be removed in PyDy 0.4.0. Use the the new 'generate_ode_function' in 'pydy.codegen.ode_function_generator'
  PyDyDeprecationWarning)
/home/oliver/repos/pydy/pydy/codegen/ode_function_generators.py:397: PyDyDeprecationWarning: The old style args, i.e. {'constants': , 'specified'}, for the generated function will be removed in PyDy 0.4.0.
  PyDyDeprecationWarning)
/home/oliver/repos/pydy/pydy/codegen/code.py:71: PyDyDeprecationWarning: This function is deprecated and will be removed in PyDy 0.4.0. Use the the new 'generate_ode_function' in 'pydy.codegen.ode_function_generator'
  PyDyDeprecationWarning)
/home/oliver/repos/pydy/pydy/codegen/ode_function_generators.py:397: PyDyDeprecationWarning: The old style args, i.e. {'constants': , 'specified'}, for the generated function will be removed in PyDy 0.4.0.
  PyDyDeprecationWarning)
ok

----------------------------------------------------------------------
Ran 1 test in 1.602s

OK
(dev)oliver@enif:~/repos/pydy$ conda list cython
# packages in environment at /home/oliver/miniconda3/envs/dev:
#

(dev)oliver@enif:~/repos/pydy$ conda list theano
# packages in environment at /home/oliver/miniconda3/envs/dev:
#
theano                    0.7.0               np110py35_0  
Contributor

oliverlee commented Oct 17, 2015

(dev)oliver@enif:~/repos/pydy$ nosetests -v pydy/codegen/tests/test_code.py:TestCode.test_generate_ode_function
/home/oliver/repos/pydy/pydy/codegen/code.py:25: PyDyDeprecationWarning: This module, 'pydy.codgen.code', is deprecated. The function 'generate_ode_function' can be found in the 'pydy.codegen.ode_function_generator' module. 'CythonGenerator' has been removed, use 'pydy.codegen.cython_code.CythonMatrixGenerator' instead.
  PyDyDeprecationWarning)
pydy.codegen.tests.test_code.TestCode.test_generate_ode_function ... /home/oliver/repos/pydy/pydy/codegen/code.py:71: PyDyDeprecationWarning: This function is deprecated and will be removed in PyDy 0.4.0. Use the the new 'generate_ode_function' in 'pydy.codegen.ode_function_generator'
  PyDyDeprecationWarning)
/home/oliver/repos/pydy/pydy/codegen/ode_function_generators.py:397: PyDyDeprecationWarning: The old style args, i.e. {'constants': , 'specified'}, for the generated function will be removed in PyDy 0.4.0.
  PyDyDeprecationWarning)
/home/oliver/repos/pydy/pydy/codegen/code.py:71: PyDyDeprecationWarning: This function is deprecated and will be removed in PyDy 0.4.0. Use the the new 'generate_ode_function' in 'pydy.codegen.ode_function_generator'
  PyDyDeprecationWarning)
/home/oliver/repos/pydy/pydy/codegen/ode_function_generators.py:397: PyDyDeprecationWarning: The old style args, i.e. {'constants': , 'specified'}, for the generated function will be removed in PyDy 0.4.0.
  PyDyDeprecationWarning)
/home/oliver/repos/pydy/pydy/codegen/code.py:71: PyDyDeprecationWarning: This function is deprecated and will be removed in PyDy 0.4.0. Use the the new 'generate_ode_function' in 'pydy.codegen.ode_function_generator'
  PyDyDeprecationWarning)
/home/oliver/repos/pydy/pydy/codegen/ode_function_generators.py:397: PyDyDeprecationWarning: The old style args, i.e. {'constants': , 'specified'}, for the generated function will be removed in PyDy 0.4.0.
  PyDyDeprecationWarning)
/home/oliver/repos/pydy/pydy/codegen/code.py:71: PyDyDeprecationWarning: This function is deprecated and will be removed in PyDy 0.4.0. Use the the new 'generate_ode_function' in 'pydy.codegen.ode_function_generator'
  PyDyDeprecationWarning)
/home/oliver/repos/pydy/pydy/codegen/ode_function_generators.py:397: PyDyDeprecationWarning: The old style args, i.e. {'constants': , 'specified'}, for the generated function will be removed in PyDy 0.4.0.
  PyDyDeprecationWarning)
/home/oliver/repos/pydy/pydy/codegen/code.py:71: PyDyDeprecationWarning: This function is deprecated and will be removed in PyDy 0.4.0. Use the the new 'generate_ode_function' in 'pydy.codegen.ode_function_generator'
  PyDyDeprecationWarning)
/home/oliver/repos/pydy/pydy/codegen/ode_function_generators.py:397: PyDyDeprecationWarning: The old style args, i.e. {'constants': , 'specified'}, for the generated function will be removed in PyDy 0.4.0.
  PyDyDeprecationWarning)
/home/oliver/repos/pydy/pydy/codegen/code.py:71: PyDyDeprecationWarning: This function is deprecated and will be removed in PyDy 0.4.0. Use the the new 'generate_ode_function' in 'pydy.codegen.ode_function_generator'
  PyDyDeprecationWarning)
/home/oliver/repos/pydy/pydy/codegen/ode_function_generators.py:397: PyDyDeprecationWarning: The old style args, i.e. {'constants': , 'specified'}, for the generated function will be removed in PyDy 0.4.0.
  PyDyDeprecationWarning)
ok

----------------------------------------------------------------------
Ran 1 test in 1.602s

OK
(dev)oliver@enif:~/repos/pydy$ conda list cython
# packages in environment at /home/oliver/miniconda3/envs/dev:
#

(dev)oliver@enif:~/repos/pydy$ conda list theano
# packages in environment at /home/oliver/miniconda3/envs/dev:
#
theano                    0.7.0               np110py35_0  

moorepants added a commit that referenced this pull request Oct 17, 2015

Merge pull request #276 from oliverlee/fix-test-without-optional-dep
Test optional dependencies only if installed

@moorepants moorepants merged commit d7c415c into pydy:master Oct 17, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@moorepants

This comment has been minimized.

Show comment
Hide comment
@moorepants

moorepants Oct 17, 2015

Member

FYI, we can use sympy's tools for this too. The have a decorator for tests that is nice.

Member

moorepants commented Oct 17, 2015

FYI, we can use sympy's tools for this too. The have a decorator for tests that is nice.

@oliverlee

This comment has been minimized.

Show comment
Hide comment
@oliverlee

oliverlee Oct 17, 2015

Contributor

Can you point out an example?
On Oct 17, 2015 21:38, "Jason K. Moore" notifications@github.com wrote:

FYI, we can use sympy's tools for this too. The have a decorator for tests
that is nice.


Reply to this email directly or view it on GitHub
#276 (comment).

Contributor

oliverlee commented Oct 17, 2015

Can you point out an example?
On Oct 17, 2015 21:38, "Jason K. Moore" notifications@github.com wrote:

FYI, we can use sympy's tools for this too. The have a decorator for tests
that is nice.


Reply to this email directly or view it on GitHub
#276 (comment).

@moorepants

This comment has been minimized.

Show comment
Hide comment

@oliverlee oliverlee deleted the oliverlee:fix-test-without-optional-dep branch Oct 18, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment