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

Misc doctest and pytrest fixes #1066

Merged
merged 2 commits into from
Aug 11, 2024
Merged

Misc doctest and pytrest fixes #1066

merged 2 commits into from
Aug 11, 2024

Conversation

rocky
Copy link
Member

@rocky rocky commented Aug 11, 2024

Fix some doctest and pytest bugs...

test.parameters.{doc_even_if_error,keep_going}:

  • doc_even_if_error is not defined; keep_going is.

mathics/docpipeline.py:

  • remove find_texdata_folder(): it is not used and it also refers to a nonexistent class element

  • test_case(... fail: Optional[]...= ...) allows an explicit None to be passed. None was not tested for in using fail(). Make parameter not optional

  • call to doctest_pripile.print_and_log missing f-string specifier. Not sure why we need the for loop.

  • start_time needs to be initialized

test/builtin/files_io/test_importexport.py:

  • test was pollutes local file system with 123.txt. Ideally None of the tests would work in the local filesystem; a temporary file system is okay though.

rocky added 2 commits August 10, 2024 22:00
doc_even_if_error is not defined; keep_going is?
mathics/docpipeline.py:
   remove find_texdata_folder(): it is not used and it also refers to a nonexistent
   class element

   test_case(... fail: Optional[]...= ...) allows an explicit None to be passed.
     None was not tested for in using fail(). Make not optional

   call to doctest_pripile.print_and_log missing f-string specifier.
     Not sure why we need the for loop.

   start_time needs to be initialized

test/builtin/files_io/test_importexport.py:
   test was pollutes local file sytem with 123.txt
   Ideally *None* of the tests would work in the local filesystem; a
   temp filesystem is okay though.
@rocky rocky requested a review from mmatera August 11, 2024 10:12
Copy link
Contributor

@mmatera mmatera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catchs!LGTM

@rocky rocky merged commit 1f408cb into master Aug 11, 2024
10 checks passed
@rocky rocky deleted the misc-fixes branch August 11, 2024 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants