Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doctest failure from #21165 #21402

Closed
videlec opened this issue Sep 2, 2016 · 7 comments
Closed

Doctest failure from #21165 #21402

videlec opened this issue Sep 2, 2016 · 7 comments

Comments

@videlec
Copy link
Contributor

videlec commented Sep 2, 2016

The deprecation warnings introduced in #21165 causes failures when the optional package gap_packages is installed

**********************************************************************
File "src/sage/coding/linear_code.py", line 3059, in sage.coding.linear_code.AbstractLinearCode.weight_distribution
Failed example:
    C.weight_distribution(algorithm="leon")   # optional - gap_packages (Guava package)
Expected:
    [1, 0, 0, 7, 7, 0, 0, 1]
Got:
    doctest:warning
    ...
    DeprecationWarning: code2leon is deprecated. Please use sage.coding.linear_code._dump_code_in_leon_format instead.
    See http://trac.sagemath.org/21165 for details.
    [1, 0, 0, 7, 7, 0, 0, 1]
**********************************************************************
File "src/sage/coding/linear_code.py", line 3365, in sage.coding.linear_code.AbstractLinearCode.zeta_polynomial
Failed example:
    C = best_known_linear_code(6,3,GF(2))  # optional - gap_packages (Guava package)
Expected nothing
Got:
    doctest:warning
    ...
    DeprecationWarning: best_known_linear_code has moved to sage.coding.databases.best_linear_code_in_guava
    See http://trac.sagemath.org/21165 for details.
**********************************************************************
File "src/sage/coding/databases.py", line 32, in sage.coding.databases.best_linear_code_in_guava
Failed example:
    codes.databases.best_linear_code_in_guava(10,5,GF(2))    # long time; optional - gap_packages (Guava package)
Exception raised:
    Traceback (most recent call last):
    ...
    TypeError: Gap produced error output
    Error, Variable: 'BestKnownLinearCode' must have a value

       executing \$sage1:=BestKnownLinearCode(10,5,GF(2));;
**********************************************************************
File "src/sage/coding/databases.py", line 82, in sage.coding.databases.bounds_on_minimum_distance_in_guava
Failed example:
    gap_rec = codes.databases.bounds_on_minimum_distance_in_guava(10,5,GF(2))  # optional - gap_packages (Guava package)
Exception raised:
    Traceback (most recent call last):
    ...
    RuntimeError: Gap produced error output
    Error, Variable: 'BoundsMinimumDistance' must have a value

       executing data := BoundsMinimumDistance(10,5,GF(2));

CC: @sagetrac-dlucas @sagetrac-jsm

Component: coding theory

Author: Johan Rosenkilde

Branch/Commit: dcec483

Reviewer: Volker Braun

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

@videlec videlec added this to the sage-7.4 milestone Sep 2, 2016
@videlec

This comment has been minimized.

@johanrosenkilde
Copy link
Contributor

@johanrosenkilde
Copy link
Contributor

comment:4

Fixed. Two failures were simply calling functions deprecated in #21165. Two failures were due to no loading of optional Gap package Guava, which wasn't a problem before #21165 because that package seemingly was imported earlier in the testing of linear_code.py.


New commits:

dcec483Explicit loading of Guava when needed. Change uses of deprecated functions

@johanrosenkilde
Copy link
Contributor

Author: Johan Rosenkilde

@johanrosenkilde
Copy link
Contributor

Commit: dcec483

@vbraun
Copy link
Member

vbraun commented Sep 4, 2016

Reviewer: Volker Braun

@vbraun
Copy link
Member

vbraun commented Sep 8, 2016

Changed branch from u/jsrn/21402_linear_code_doctest_fails to dcec483

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

No branches or pull requests

4 participants