getnikola / nikola

A static website and blog generator
https://getnikola.com/
MIT License
2.62k stars 450 forks source link

pytest 8.0.0 breaks test_command_import_wordpress #3753

Closed Kwpolska closed 10 months ago

Kwpolska commented 10 months ago

Regression in CI after pytest got bumped to version 8:

=================================== FAILURES ===================================
_____________________ test_importing_posts_and_attachments _____________________

module = <module 'nikola.plugins.command.import_wordpress' from '/Users/runner/work/nikola/nikola/nikola/plugins/command/import_wordpress.py'>
import_command = <nikola.plugins.command.import_wordpress.CommandImportWordpress object at 0x10dedf8c0>
import_filename = '/Users/runner/work/nikola/nikola/tests/data/wordpress_import/wordpress_export_example.xml'

    def test_importing_posts_and_attachments(module, import_command, import_filename):
        channel = import_command.get_channel_from_file(import_filename)
        import_command.base_dir = ""
        import_command.output_folder = "new_site"
        import_command.squash_newlines = True
        import_command.no_downloads = False
        import_command.export_categories_as_categories = False
        import_command.export_comments = False
        import_command.html2text = False
        import_command.transform_to_markdown = False
        import_command.transform_to_html = False
        import_command.use_wordpress_compiler = False
        import_command.tag_saniziting_strategy = "first"
        import_command.separate_qtranslate_content = False
        import_command.translations_pattern = "{path}.{lang}.{ext}"

        import_command.context = import_command.populate_context(channel)

        # Ensuring clean results
        # assert not import_command.url_map
>       assert not module.links
E       AssertionError: assert not {'foo': '/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pytest-of-runner/pytest-0/integration20/target/files/wp-cont...test-of-runner/pytest-0/integration20/target/files/wp-content/uploads/2011/04/NoirsEtPleinsDeLumière-150x150.jpg', ...}
E        +  where {'foo': '/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pytest-of-runner/pytest-0/integration20/target/files/wp-cont...test-of-runner/pytest-0/integration20/target/files/wp-content/uploads/2011/04/NoirsEtPleinsDeLumière-150x150.jpg', ...} = <module 'nikola.plugins.command.import_wordpress' from '/Users/runner/work/nikola/nikola/nikola/plugins/command/import_wordpress.py'>.links