[hawkmoth] Re: [PATCH 0/8] test: unit testing overhaul

  • From: Bruno Santos <brunomanuelsantos@xxxxxxxxxxxxxxxxxx>
  • To: hawkmoth@xxxxxxxxxxxxx, Jani Nikula <jani@xxxxxxxxxx>
  • Date: Sat, 15 Dec 2018 17:08:55 +0100



On 12/13/18 10:11 PM, Jani Nikula wrote:

Convert old cmdtest based tests to python, add unit tests for the
extension.

Are the tests supposed to be passing? There's at least one issue I'm aware of
and I'll raise it in reply to the relevant commit, but all tests fail with
different output.

For the parser, it seems to be related to extra new lines. Maybe related to
different Sphinx versions? Don't know. Output for the 1st test after the
break. I also get differences in the directive tests, but they may be
related.

Review will follow.

-- >8 --

======================================================================
FAIL: test_parser (__main__.ParserTest) (source='compat-javadoc-basic.c', 
path='/home/bruno/Documents/projects/bms-contrib/hawkmoth/test')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_hawkmoth.py", line 29, in run_dir
    self.run_test(f)
  File "test/test_hawkmoth.py", line 20, in run_test
    self.assertEqual(expected, output)
AssertionError: '\n\n[77 chars]n\n\n.. c:function:: int foo(int quick)\n\n   
[232 chars]\n\n' != '\n\n[77 chars]n\n\n\n.. c:function:: int foo(int 
quick)\n\n [244 chars]\n\n'


  :param quick: brown fox

  :return: quick brown fox
  @random quick brown fox
+


  .. c:function:: int foo(int quick)


     :param quick: brown fox

     :return: quick brown fox
     @random quick brown fox

+

  .. c:function:: int kerneldoc(int quick)

     @quick: quick brown fox
     @return: quick brown fox
     @random: quick brown fox

+




-- 
Bruno Santos

PGP KEY: 941052CD (pool.sks-keyservers.net)

Other related posts: