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

Broken Tests #90

Open
xeruf opened this issue Dec 2, 2022 · 2 comments
Open

Broken Tests #90

xeruf opened this issue Dec 2, 2022 · 2 comments
Assignees

Comments

@xeruf
Copy link
Contributor

xeruf commented Dec 2, 2022

It is kind of hard to test if new changes don't break anything if the current master is broken ;)

lib/tests/htmlizer_test.py:317: AssertionError
------------------------------------------------------------------------------------------------------------------ Captured stdout call ------------------------------------------------------------------------------------------------------------------
=================  first difference  ===================== in line 19
       [<tr class="even">]
found  [<td><a href="file://///Karl-Voit.at/2007/01/29/my-temporal">internal]
       [<strong>link</strong> test</a></td>]
    ---------------  comparison data:  --------------------
       [<tr class="even">]
should [<td><a href="//Karl-Voit.at/2007/01/29/my-temporal">internal <strong>link</strong> test</a></td>]
       [<td>10</td>]
=================                    =====================
================================================================================================================ short test summary info =================================================================================================================
FAILED lib/tests/htmlizer_test.py::TestHtmlizer::test_sanitize_and_htmlize_complex_table - AssertionError: False is not true
============================================================================================================== 1 failed, 11 passed in 0.29s ==============================================================================================================
❯ ./start_end-to-end-test.sh
\n====> Runing end-to-end test ...\n
./start_end-to-end-test.sh: line 15: cd: /home/janekf/src/lazyblorg: No such file or directory
Warning: DIRECTORIES_WITH_IMAGE_ORIGINALS[1] which is set to "/home/janekf/tmp/digicam/tmp" is not an existing directory. It will be ignored.
Warning: DIRECTORIES_WITH_IMAGE_ORIGINALS[2] which is set to "/home/janekf/tmp/digicam/oneplus5" is not an existing directory. It will be ignored.
Warning: DIRECTORIES_WITH_IMAGE_ORIGINALS[3] which is set to "/home/janekf/archive/events_memories/2019" is not an existing directory. It will be ignored.
Warning: DIRECTORIES_WITH_IMAGE_ORIGINALS[4] which is set to "/home/janekf/archive/events_memories/2020" is not an existing directory. It will be ignored.
Warning: DIRECTORIES_WITH_IMAGE_ORIGINALS[5] which is set to "/home/janekf/archive/events_memories/2021" is not an existing directory. It will be ignored.
Warning: DIRECTORIES_WITH_IMAGE_ORIGINALS[6] which is set to "/home/janekf/archive/events_memories/2022" is not an existing directory. It will be ignored.
Warning: DIRECTORIES_WITH_IMAGE_ORIGINALS[7] which is set to "/home/janekf/fun/netfun" is not an existing directory. It will be ignored.
Warning: DIRECTORIES_WITH_IMAGE_ORIGINALS[8] which is set to "/home/janekf/archive/fromweb/cliparts" is not an existing directory. It will be ignored.
Warning: MEMACS_FILE_WITH_IMAGE_FILE_INDEX is not empty but contains no existing file. Please fill it with an existing filename containing a Memacs file index or set either MEMACS_FILE_WITH_IMAGE_FILE_INDEX or CUSTOMIZED_IMAGE_LINK_KEY to an empty st
ring.
Warning: IMAGE_CACHE_DIRECTORY is set but points to a directory which does not exist. Either empty the string or create its cache directory at "/home/janekf/src/lazyblorg/testdata/imagecache".
WARNING  Blog data file "testdata/end_to_end_test/lazyblorg-e2e-test-previous-metadata.pk" is not found. Assuming first run!
INFO     • Parsing Org mode files …
INFO     no previous metadata found: must be the first run of lazyblorg with this configuration
INFO     Parsed 9 Org-mode files with 2805 lines (in 0.01 seconds)
INFO     • Generating articles …
DEBUG:root:Article empty-language-autotag-page contains only back-references which could not be located. I therefore omit the whole section alltogether.
DEBUG:root:Article 2014-03-09-about contains only back-references which could not be located. I therefore omit the whole section alltogether.
DEBUG:root:Article 2017-01-03-how-to-use-public-voit contains only back-references which could not be located. I therefore omit the whole section alltogether.
[WARNING] Could not convert TeX math 42 * 7 = \frac{c}{45x}, rendering as TeX
WARNING:pypandoc:Could not convert TeX math 42 * 7 = \frac{c}{45x}, rendering as TeX
[WARNING] Could not convert TeX math \begin{aligned}
    \label{eq:my-eqn-array}
    x^2_\text{eff} = \frac{\text{result}}{42*23/7}
  \end{aligned}, rendering as TeX

WARNING:pypandoc:Could not convert TeX math \begin{aligned}
    \label{eq:my-eqn-array}
    x^2_\text{eff} = \frac{\text{result}}{42*23/7}
  \end{aligned}, rendering as TeX

INFO     • Building index of files …
INFO     Built index for 3 files (in 0.00 seconds)
INFO:root:filename 2017-03-11T18.29.21 Sterne im Baum -- mytag publicvoit.jpg is an alternative to 2017-03-11T18.29.21%20Sterne%20im%20Baum%20--%20mytag%20publicvoit.jpg
INFO:root:filename 2017-03-11T18.29.21 Sterne im Baum -- mytag publicvoit.jpg is an alternative to 2017-03-11T18.29.21%20Sterne%20im%20Baum%20--%20mytag%20publicvoit.jpg
INFO:root:filename 2017-03-11T18.29.21 Sterne im Baum -- mytag publicvoit.jpg is an alternative to 2017-03-11T18.29.21%20Sterne%20im%20Baum%20--%20mytag%20publicvoit.jpg
INFO:root:filename 2017-03-11T18.29.21 Sterne im Baum -- mytag publicvoit.jpg is an alternative to 2017-03-11T18.29.21%20Sterne%20im%20Baum%20--%20mytag%20publicvoit.jpg
WARNING  [Entry ID 2014-01-27-full-syntax-test] • a customized image had description *and* caption. I used the caption: [['2017-03-11T18.29.21 Sterne im Baum -- mytag publicvoit.jpg', 'If there is an CAPTION, this title gets ignored', 'This is going 
to be the caption', {'alt': 'This is going to be the alt parameter of the img tag', 'title': 'The title is ignored', 'align': 'right', 'width': '300'}]]
INFO:root:filename 2017-03-11T18.29.21 Sterne im Baum -- mytag publicvoit.jpg is an alternative to 2017-03-11T18.29.21%20Sterne%20im%20Baum%20--%20mytag%20publicvoit.jpg
DEBUG:root:dict_of_image_files_with_width_height: adding width/height=800/600 to basename: 2017-03-11T18.29.21 Sterne im Baum -- mytag publicvoit.jpg
DEBUG:root:dict_of_image_files_with_width_height: cache hit
DEBUG:root:dict_of_image_files_with_width_height: cache hit
[ WARN:0@1.543] global /build/opencv/src/opencv-4.6.0/modules/imgcodecs/src/loadsave.cpp (239) findDecoder imread_('/home/janekf/src/lazyblorg/testdata/imagecache/2017-03-11T18.29.21 Sterne im Baum -- mytag publicvoit - scaled width 300.jpg'): can't 
open/read file: check file path/integrity
CRITICAL Something happened with entry ID: [Entry ID 2014-01-27-full-syntax-test] • 
Traceback (most recent call last):
  File "/home/janekf/data/1-projects/1-personal/lazyblorg/./lazyblorg.py", line 606, in <module>
    statistics_list = lazyblorg.generate_output(generate, marked_for_feed, increment_version)
  File "/home/janekf/data/1-projects/1-personal/lazyblorg/./lazyblorg.py", line 180, in generate_output
    return htmlizer.run()  # FIXXME: return value?
  File "/home/janekf/data/1-projects/1-personal/lazyblorg/lib/htmlizer.py", line 214, in run
    stats_generated_persistent, stats_generated_tags = self._generate_pages_for_tags_persistent_temporal(tags)
  File "/home/janekf/data/1-projects/1-personal/lazyblorg/lib/htmlizer.py", line 378, in _generate_pages_for_tags_persistent_temporal
    htmlfilename, orgfilename, htmlcontent = self._generate_page(config.TEMPORAL, entry)
  File "/home/janekf/data/1-projects/1-personal/lazyblorg/lib/htmlizer.py", line 421, in _generate_page
    entry, orgfilename, htmlfilename = self._create_path_and_generate_filenames_and_copy_images(originalentry)
  File "/home/janekf/data/1-projects/1-personal/lazyblorg/lib/htmlizer.py", line 1895, in _create_path_and_generate_filenames_and_copy_images
    width, height = self.copy_cust_link_image_file(filename, path, attributes['width'])
  File "/home/janekf/data/1-projects/1-personal/lazyblorg/lib/htmlizer.py", line 2699, in copy_cust_link_image_file
    return self._save_width_height_to_dict_of_image_files_with_width_height(cached_image_file_name)
  File "/home/janekf/data/1-projects/1-personal/lazyblorg/lib/htmlizer.py", line 2607, in _save_width_height_to_dict_of_image_files_with_width_height
    imageheight, imagewidth = img.shape[:2]
AttributeError: 'NoneType' object has no attribute 'shape'
@novoid novoid self-assigned this Dec 7, 2022
@novoid
Copy link
Owner

novoid commented Dec 7, 2022

This is a very unfortunate situation.

On my machine, it's working. Of course, tests should be working on any machine - I know that. I'm not sure if I'm able to fix some tests for the general case. This holds true for start_end-to-end-test.sh I guess.

The AttributeError in htmlizer.py is strange. That's maybe related to an issue in combination with an external library?

@xeruf
Copy link
Contributor Author

xeruf commented Dec 12, 2022

Maybe I can push this into CI at some point and see whether it is a local issue of mine :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants