Skip to content

Increase CPython test coverage #1671

Closed
Closed

Description

@palaviv

We are currently running part of the CPython test suite. This is a good place for people new to the project to contribute. Contribution here can come in two ways:

  • Fix failing test - Look for tests marked as skipped or xfail and fix RustPython so that the test will pass.
  • Add more tests suites - Copy test suite from CPython and mark failing tests with xfail or skip.

In order to run the test suite use cargo run -- -m test -v.
All tests are in Lib/test

Guide: https://rustpython.github.io/blog/2020/04/04/how-to-contribute-by-cpython-unittest.html

Activity

  1. abitrolly commented on Jan 25, 2020

    @abitrolly

    @palaviv is it possible to generate and online dashboard that shows which tests pass and which need more help?

  2. palaviv commented on Jan 25, 2020

    @palaviv
    ContributorAuthor

    I am sure it is possible... Would you like to create such a dashboard? I think you can use testgrid for that.
    My recommendation would be to run the test suite as described above and pick any of the exprectedFailure or skipped test marked as RustPython change. I am not sure a dashboard would be effective here.

  3. abitrolly commented on Jan 25, 2020

    @abitrolly

    @palaviv is it possible to get the report in a file in machine readable format, such as https://testanything.org ?

  4. palaviv commented on Jan 26, 2020

    @palaviv
    ContributorAuthor

    The test use test\libregtest and run the underline unittests tests. I am not sure if there is a builtin support in either for the format you want...

  5. mireille-raad commented on Mar 23, 2020

    @mireille-raad
    Member

    Would it help having the dashboard somewhere on the current website?

    If you are looking for a dashboard, we can do two pages:

    • one for tests passed/failed status
    • another for the "what is left" script.

    The goal would be for people to know what they can help on in one place.

    I can probably get the output of both scripts to push to github repos and then use that as part of jekyll page or just as something people can read.

  6. coolreader18 commented on Mar 23, 2020

    @coolreader18
    Member

    I think that would be cool, and it would probably require getting the test results in a machine readable format like TAP. It seems like tappy works perfectly fine on RustPython, the only issue is getting regrtest to run a custom unittest test runner.

  7. abitrolly commented on Mar 23, 2020

    @abitrolly

    @mireille-raad is it be possible to have single dashboard for both passed/failed and "what is left" by color coding them with green, red and yellow?

  8. coolreader18 commented on Mar 23, 2020

    @coolreader18
    Member

    I don't know if it makes sense to have them in the same dashboard, since the regrtests are tests that get run and are well structured, while the whats_left script just shows standard library items that aren't present in RustPython; they don't really show the same kind of data.

  9. abitrolly commented on Mar 23, 2020

    @abitrolly

    @coolreader18 regrtests and standard library items are different test sets?

  10. coolreader18 commented on Mar 23, 2020

    @coolreader18
    Member

    Well yeah, sort of; all whats_left.sh does is diff the list of standard library modules and the dir() outputs of them, and see what CPython has that RustPython doesn't. It doesn't actually run any code; you could "fix" something to remove it from the whats_left list by just doing def missingthing(): raise NotImplementedError.

  11. abitrolly commented on Mar 23, 2020

    @abitrolly

    @coolreader18 but do testnames match between what is available in RustPython and upstream? If they do, then it might be possible to get the test results from both test servers in TAP format and diff them.

  12. coolreader18 commented on Mar 23, 2020

    @coolreader18
    Member

    That's not really necessary, since every test that's in CPython is passing (or should be, at least), so we can assume that any test that fails on RustPython should be passing, no diffing required.

  13. coolreader18 commented on Mar 23, 2020

    @coolreader18
    Member

    whats_left.sh isn't for regrtests, it's only for the standard library.

  14. 39 remaining items

  15. added a commit that references this issue on Oct 24, 2022
  16. added a commit that references this issue on Oct 26, 2022
  17. youknowone commented on Feb 24, 2023

    @youknowone
    Member

    I removed good first issue label because it is not trivially easy like before in 2020.
    But it still has many easy issues yet!

  18. pinned this issue on Feb 24, 2023
  19. DimitrisJim commented on Feb 24, 2023

    @DimitrisJim
    Member

    @youknowone can't this be closed in favor of #4564? They both overlap but 4564 is more organized and up to date.

  20. youknowone commented on Feb 25, 2023

    @youknowone
    Member

    I removed adding test from the issue body but kept fixing errors. does it make sense? We may can open new one with more organized form using dashboard

  21. ShaharNaveh commented on Jan 29, 2026

    @ShaharNaveh
    Contributor

    @youknowone can we close this issue in favor of #6839 ?

  22. youknowone commented on Jan 29, 2026

    @youknowone
    Member

    Sure, we now have better automatic tracking

  23. unpinned this issue on Jan 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions