Skip to content

Documentation improvements (related to regendoc) #1061

Closed

Description

@The-Compiler

As discussed in IRC with @RonnyPfannschmidt I'll list some stuff from #1046 here as the PR is clearly an improvement over the current state, so I want to merge it.

  • test_time.py in doc/en/example/parametrize.rst seems to be broken:
======= ERRORS ========
_______ ERROR collecting test_time.py ________
$PYTHON_PREFIX/lib/python3.4/site-packages/_pytest/python.py:581: in _importtestmodule
    mod = self.fspath.pyimport(ensuresyspath=importmode)
$PYTHON_PREFIX/lib/python3.4/site-packages/py/_path/local.py:650: in pyimport
    __import__(modname)
E     File "$REGENDOC_TMPDIR/test_time.py", line 5
E       (datetime(2001, 12, 11), datetime(2001, 12, 12), timedelta(-1)),
E                                                                      ^
E   SyntaxError: unexpected EOF while parsing
======= 1 error in 0.12 seconds ========

(running the code by hand works though)

  • There's an example in doc/en/example/pythoncollection.rst which demonstrates having a test which runs on Python 2 only - the output now fails to bring the point across as it's run with python 3 (see fix documentation regeneration, kill Makefile #1046)
  • print should be adjusted to print() as the examples are run with Python 3 now, otherwise tuple printing looks odd:
-    test_module.py E('setting up a test failed!', 'test_module.py::test_setup_fails')
-    F('executing test failed', 'test_module.py::test_call_fails')
+    test_module.py Esetting up a test failed! test_module.py::test_setup_fails
+    Fexecuting test failed test_module.py::test_call_fails
  • doc/en/example/nonpython.rst doesn't seem to be deterministic when regenerating the docs, which would be nice:
@@ -31,7 +31,7 @@ now execute the test specification::
     rootdir: $REGENDOC_TMPDIR/nonpython, inifile: 
     collected 2 items

-    test_simple.yml .F
+    test_simple.yml F.

     ======= FAILURES ========
     _______ usecase: hello ________
@@ -64,8 +64,8 @@ consulted when reporting in ``verbose`` mode::
     rootdir: $REGENDOC_TMPDIR/nonpython, inifile: 
     collecting ... collected 2 items

-    test_simple.yml::ok PASSED
     test_simple.yml::hello FAILED
+    test_simple.yml::ok PASSED

     ======= FAILURES ========
     _______ usecase: hello ________
@@ -85,7 +85,7 @@ interesting to just look at the collection tree::
     rootdir: $REGENDOC_TMPDIR/nonpython, inifile: 
     collected 2 items
     <YamlFile 'test_simple.yml'>
-      <YamlItem 'ok'>
       <YamlItem 'hello'>
+      <YamlItem 'ok'>

     =======  in 0.12 seconds ========
  • Line numbers change when regenerating the docs - maybe those could be masked with regendoc somehow?
@@ -133,7 +133,7 @@ objects, they are still using the default pytest representation::

     ======= ERRORS ========
     _______ ERROR collecting test_time.py ________
-    $PYTHON_PREFIX/lib/python3.4/site-packages/_pytest/python.py:581: in _importtestmodule
+    $PYTHON_PREFIX/lib/python3.4/site-packages/_pytest/python.py:584: in _importtestmodule
         mod = self.fspath.pyimport(ensuresyspath=importmode)
     $PYTHON_PREFIX/lib/python3.4/site-packages/py/_path/local.py:650: in pyimport
         __import__(modname)

(and others)

Activity

  1. added this to the 2.8.2 milestone on Sep 28, 2015
  2. added
    status: help wanted
    type: docs
    good first issue
    on Sep 28, 2015
  3. modified the milestones: 2.8.2, 2.8.3 on Oct 10, 2015
  4. modified the milestones: 2.8.3, 2.8.4 on Nov 23, 2015
  5. modified the milestones: 2.8.4, 2.8.5 on Dec 6, 2015
  6. modified the milestones: 2.8.5, 2.8.6 on Dec 14, 2015
  7. nicoddemus commented on Aug 3, 2016

    @nicoddemus
    Member

    @The-Compiler I was reviewing this and I think all except for line numbers changing are fixed already in features. If you agree, I think we should close this and perhaps open another issue for regendoc specifically (perhaps even in regendoc's issue tracker).

  8. nicoddemus commented on Aug 3, 2016

    @nicoddemus
    Member

    Also see #1789

  9. The-Compiler commented on Aug 3, 2016

    @The-Compiler
    MemberAuthor

    I'm just going to trust you on that one 😉

  10. nicoddemus commented on Aug 3, 2016

    @nicoddemus
    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

    Labels

    good first issuestatus: help wantedtype: docs

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions