Skip to content

fix doctest in gap_packages when ~/.gap is not empty #28233

Closed

Description

@kiwifb

One of the doctest in the file sage/tests/gap_packages.py has a result that can depend on the content of the testing user's home directory. Namely if ~/.gap exist and it is not empty

sage -t --long /usr/lib64/python2.7/site-packages/sage/tests/gap_packages.py
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/tests/gap_packages.py", line 137, in sage.tests.gap_packages.all_installed_packages
Failed example:
    all_installed_packages() == all_installed_packages(gap=gap)
Expected:
    True
Got:
    False

This can be fixed by telling the test to ignore the content of ~/.gap.

CC: @strogdon

Component: distribution

Author: François Bissey

Branch/Commit: 25d55f9

Reviewer: Steven Trogdon

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

Activity

  1. added this to the sage-8.9 milestone on Jul 23, 2019
  2. kiwifb commented on Jul 23, 2019

    @kiwifb
    MemberAuthor

    Author: François Bissey

  3. kiwifb commented on Jul 23, 2019

    @kiwifb
    MemberAuthor
    comment:1

    Reminder: this happens because by default libgap always look at the content of ~/.gap but the pexpect interface to gap doesn't. This ticket explicitly discards the content of ~/.gap in all cases.


    New commits:

    25d55f9Use "ignore_dot_gap" in the all_installed_packages doctest for consistency.
  4. kiwifb commented on Jul 23, 2019

    @kiwifb
    MemberAuthor
  5. kiwifb commented on Jul 23, 2019

    @kiwifb
    MemberAuthor

    Commit: 25d55f9

  6. strogdon commented on Jul 23, 2019

    @strogdon
    Contributor

    Reviewer: Steven Trogdon

  7. strogdon commented on Jul 23, 2019

    @strogdon
    Contributor
    comment:2

    I think given the status of gap -r that this is the best thing to do. It, of course, does work. Should the description doctest be relative to vanilla Sage? If so, I can change this if you do not have access to vanilla.

  8. kiwifb commented on Jul 23, 2019

    @kiwifb
    MemberAuthor
    comment:3

    No it doesn't matter. Leave it be.

  9. vbraun commented on Jul 29, 2019

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions