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

3 failing internet doctests in databases/oeis.py #35437

Closed
2 tasks done
seblabbe opened this issue Apr 4, 2023 · 0 comments · Fixed by #35439
Closed
2 tasks done

3 failing internet doctests in databases/oeis.py #35437

seblabbe opened this issue Apr 4, 2023 · 0 comments · Fixed by #35439
Labels
Milestone

Comments

@seblabbe
Copy link
Contributor

seblabbe commented Apr 4, 2023

Is there an existing issue for this?

  • I have searched the existing issues for a bug report that matches the one I want to file, without success.

Did you read the documentation and troubleshoot guide?

  • I have read the documentation and troubleshoot guide

Environment

- **OS**: Ubuntu 18.04
- **Sage Version**: 10.0.beta7

Steps To Reproduce

The command

sage -t --optional=sage,internet src/sage/databases/oeis.py

returns

sage -t --long --random-seed=319675451421640445800652566785887159111 src/sage/databases/oeis.py
**********************************************************************
File "src/sage/databases/oeis.py", line 983, in sage.databases.oeis.OEISSequence.keywords
Failed example:
    f = oeis(53) ; f                      # optional -- internet
Expected:
    A000053: Local stops on New York City Broadway line (IRT #1) subway.
Got:
    A000053: Local stops on New York City 1 Train (Broadway-7 Avenue Local) subway.
**********************************************************************
File "src/sage/databases/oeis.py", line 1632, in sage.databases.oeis.OEISSequence.cross_references
Failed example:
    nbalanced.cross_references()              # optional -- internet
Expected:
    ('A049703', 'A049695', 'A103116', 'A000010')
Got:
    ('A000010', 'A002088', 'A011755', 'A049695', 'A049703', 'A103116')
**********************************************************************
File "src/sage/databases/oeis.py", line 1635, in sage.databases.oeis.OEISSequence.cross_references
Failed example:
    nbalanced.cross_references(fetch=True)    # optional -- internet
Expected:
    0: A049703: a(0) = 0; for n>0, a(n) = A005598(n)/2.
    1: A049695: Array T read by diagonals; ...
    2: A103116: a(n) = Sum_{i=1..n} (n-i+1)*phi(i).
    3: A000010: Euler totient function phi(n): count numbers <= n and prime to n.
Got:
    0: A000010: Euler totient function phi(n): count numbers <= n and prime to n.
    1: A002088: Sum of totient function: a(n) = Sum_{k=1..n} phi(k), cf. A000010.
    2: A011755: a(n) = Sum_{k=1..n} k*phi(k).
    3: A049695: Array T read by diagonals; T(i,j) is the number of nonnegative slopes of lines determined by 2 lattice points in [ 0,i ] X [ 0,j ] if i > 0; T(0,j)=1 if j > 0; T(0,0)=0.
    4: A049703: a(0) = 0; for n>0, a(n) = A005598(n)/2.
    5: A103116: a(n) = Sum_{i=1..n} (n-i+1)*phi(i).
**********************************************************************
2 items had failures:
   2 of   7 in sage.databases.oeis.OEISSequence.cross_references
   1 of   7 in sage.databases.oeis.OEISSequence.keywords
    5 webbrowser tests not run
    0 tests not run because we ran out of time
    [289 tests, 3 failures, 34.47 s]

Expected Behavior

All tests passes

Actual Behavior

3 failing doctests

Additional Information

No response

@seblabbe seblabbe added the t: bug label Apr 4, 2023
dcoudert added a commit to dcoudert/sage that referenced this issue Apr 4, 2023
@dcoudert dcoudert mentioned this issue Apr 4, 2023
5 tasks
vbraun pushed a commit that referenced this issue Apr 13, 2023
    
Fixes #35437

### 📚 Description

This branch fixes the doctests errors reported in #35437. However, this
solution is not robust to future changes in the oeis database.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. It should be `[x]` not `[x
]`. -->

- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: #35439
Reported by: David Coudert
Reviewer(s): Sébastien Labbé
@mkoeppe mkoeppe added this to the sage-10.0 milestone Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants