Skip to content

Doctests failing maths/bailey_borwein_plouffe.py #2011

@l3str4nge

Description

@l3str4nge

Doctests are failing in https://github.com/TheAlgorithms/Python/blob/master/maths/bailey_borwein_plouffe.py

________ [doctest] maths.bailey_borwein_plouffe.bailey_borwein_plouffe _________
021     ValueError: Digit position must be a positive integer
022     >>> bailey_borwein_plouffe(0)
023     Traceback (most recent call last):
024       ...
025     ValueError: Digit position must be a positive integer
026     >>> bailey_borwein_plouffe(1.7)
027     Traceback (most recent call last):
028       ...
029     ValueError: Digit position must be a positive integer
030     >>> bailey_borwein_plouffe(2, -10)
Differences (unified diff with -expected +actual):
    @@ -1,3 +1,8 @@
     Traceback (most recent call last):
    -  ...
    -ValueError: Precision must be a nonnegative integer
    +  File "/opt/python/3.8.1/lib/python3.8/doctest.py", line 1329, in __run
    +    exec(compile(example.source, filename, "single",
    +  File "<doctest maths.bailey_borwein_plouffe.bailey_borwein_plouffe[5]>", line 1, in <module>
    +    bailey_borwein_plouffe(2, -10)
    +  File "/home/travis/build/TheAlgorithms/Python/maths/bailey_borwein_plouffe.py", line 42, in bailey_borwein_plouffe
    +    raise ValueError("Please input a nonnegative integer for the precision")
    +ValueError: Please input a nonnegative integer for the precision

Source: https://travis-ci.com/github/TheAlgorithms/Python/builds/166844585

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions