sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.32k stars 453 forks source link

chomp should have some optional tests. #12337

Closed williamstein closed 12 years ago

williamstein commented 12 years ago

Don't you think it would be really good if there were at least one test of the form "# optional - chomp" in the Sage library? In sage-4.8,

sage: search_src('chomp')

outputs 67 lines of code that somehow mention chomp, but there are no doctests at all.

Component: doctest coverage

Reviewer: Michael Orlitzky

Issue created by migration from https://trac.sagemath.org/ticket/12337

jhpalmieri commented 12 years ago
comment:1

There are about 30 such tests now. Try:

search_src('chomp', 'optional', ignore_case=True)

I propose closing this as invalid.

orlitzky commented 12 years ago
comment:2

Yup, I found a bunch. From e.g. sage/homology/tests.py,

"""
Tests for chain complexes, simplicial complexes, etc.

These test whether CHomP gives the same answers as Sage's built-in
homology calculator.

TESTS::

    sage: from sage.homology.tests import test_random_chain_complex
    sage: test_random_chain_complex(trials=20)  # optional - CHomP
    sage: test_random_chain_complex(level=2, trials=20)  # optional - CHomP
    sage: test_random_chain_complex(level=3, trials=20)  # long time # optional - CHomP

    sage: from sage.homology.tests import test_random_simplicial_complex
    sage: test_random_simplicial_complex(level=1, trials=20)  # optional - CHomP
    sage: test_random_simplicial_complex(level=2, trials=20)  # optional - CHomP
    sage: test_random_simplicial_complex(level=5/2, trials=10)  # long time # optional - CHomP
"""
orlitzky commented 12 years ago

Reviewer: Michael Orlitzky

williamstein commented 12 years ago
comment:3

IMHO, it really sucks that search_src is case sensitive by default. I had no idea. That's why I didn't find the tests.