Project

General

Profile

Actions

action #102641

closed

openqa_review: Cannot build doctests successfully size:M

Added by okurz about 3 years ago. Updated almost 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Feature requests
Target version:
Start date:
2021-11-17
Due date:
% Done:

0%

Estimated time:

Description

Observation

The doctests target is also still not working, and I don't know if there should be an extra ticket about it:

% tox -e doctests
GLOB sdist-make: /home/tina/openqa-devel/repos/openqa_review/setup.py
doctests inst-nodeps: /home/tina/openqa-devel/repos/openqa_review/.tox/dist/openqa_review-1.25.0.dev81.zip
WARNING:Discarding $PYTHONPATH from environment, to override specify PYTHONPATH in 'passenv' in your configuration.
doctests installed: attrs==21.2.0,beautifulsoup4==4.10.0,certifi==2021.10.8,charset-normalizer==2.0.7,humanfriendly==10.0,idna==3.3,importlib-metadata==4.8.2,iniconfig==1.1.1,openqa-review @ file:///home/tina/openqa-devel/repos/openqa_review/.tox/dist/openqa_review-1.25.0.dev81.zip,packaging==21.2,pika==1.2.0,pluggy==1.0.0,py==1.11.0,pyparsing==2.4.7,pytest==6.2.5,pytest-doc==0.0.1,PyYAML==6.0,requests==2.26.0,sortedcontainers==2.4.0,soupsieve==2.3.1,toml==0.10.2,typing_extensions==4.0.0,urllib3==1.26.7,zipp==3.6.0
doctests runtests: PYTHONHASHSEED='845820614'
doctests runtests: commands[0] | py.test --doctest-modules openqa_review/
============================================================================================================= test session starts ==============================================================================================================
platform linux -- Python 3.6.12, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
rootdir: /home/tina/openqa-devel/repos/openqa_review
plugins: doc-0.0.1
collected 2 items / 2 errors                                                                                                                                                                                                                   

==================================================================================================================== ERRORS ====================================================================================================================
_______________________________________________________________________________________________ ERROR collecting openqa_review/openqa_review.py ________________________________________________________________________________________________
openqa_review/openqa_review.py:111: in <module>
    from openqa_review.browser import Browser, DownloadError, BugNotFoundError, add_load_save_args  # isort:skip
E   ModuleNotFoundError: No module named 'openqa_review.browser'
_____________________________________________________________________________________________ ERROR collecting openqa_review/tumblesle_release.py ______________________________________________________________________________________________
openqa_review/tumblesle_release.py:42: in <module>
    from openqa_review.browser import Browser, add_load_save_args
E   ModuleNotFoundError: No module named 'openqa_review.browser'
=========================================================================================================== short test summary info ============================================================================================================
ERROR openqa_review/openqa_review.py - ModuleNotFoundError: No module named 'openqa_review.browser'
ERROR openqa_review/tumblesle_release.py - ModuleNotFoundError: No module named 'openqa_review.browser'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
============================================================================================================== 2 errors in 0.37s ===============================================================================================================
ERROR: InvocationError: '/home/tina/openqa-devel/repos/openqa_review/.tox/doctests/bin/py.test --doctest-modules openqa_review/'
___________________________________________________________________________________________________________________ summary ____________________________________________________________________________________________________________________
ERROR:   doctests: commands failed

Acceptance criteria

  • AC1: doctests run successfully in CI
  • AC1: doctests run successfully locally

Suggestions

  • This hasn't been working on Travis CI and also not in GHA
  • Make a mutation test to code within docs and demonstrate that something fails

Related issues 1 (0 open1 closed)

Copied from openQA Project - action #102584: openqa_review: Cannot run tox successfully locallyResolvedmkittler2021-11-17

Actions
Actions #1

Updated by okurz about 3 years ago

  • Copied from action #102584: openqa_review: Cannot run tox successfully locally added
Actions #2

Updated by livdywan about 3 years ago

  • Subject changed from openqa_review: Cannot run tox successfully locally - doc tests to openqa_review: Cannot build doctests successfully size:M
  • Description updated (diff)
  • Status changed from New to Workable
Actions #3

Updated by tinita about 3 years ago

  • Status changed from Workable to In Progress
  • Assignee set to tinita
Actions #4

Updated by tinita about 3 years ago

I got it working.
Mutation test:

% git diff
diff --git a/openqa_review/openqa_review.py b/openqa_review/openqa_review.py
index 7c9b9a4..7c513b4 100755
--- a/openqa_review/openqa_review.py
+++ b/openqa_review/openqa_review.py
@@ -360,7 +360,7 @@ def issue_listing(header, issues, show_empty=True, no_headers=False):
     @param issues: List of IssueEntry objects
     @param show_empty: show empty sections if True and issues are an empty string

-    >>> issue_listing('***new issues:***', 'None')
+    >>> ___issue_listing('***new issues:***', 'None')
     '\n***new issues:***\n\nNone\n'
     >>> issue_listing('***Common issues:***', '')
     '\n***Common issues:***\n\n\n'

% tox -e doctests
...
...
360     @param issues: List of IssueEntry objects
361     @param show_empty: show empty sections if True and issues are an empty string
362 
363     >>> ___issue_listing('***new issues:***', 'None')
UNEXPECTED EXCEPTION: NameError("name '___issue_listing' is not defined",)
Traceback (most recent call last):
  File "/usr/lib64/python3.6/doctest.py", line 1330, in __run
    compileflags, 1), test.globs)
  File "<doctest openqa_review.openqa_review.openqa_review.issue_listing[0]>", line 1, in <module>
NameError: name '___issue_listing' is not defined

...
...
Actions #6

Updated by tinita about 3 years ago

  • Status changed from In Progress to Resolved

merged

Actions

Also available in: Atom PDF