Skip to content

test_cli[Linux] and test_cli_verbose[Linux] fails on OpenIndiana #60

@mtelka

Description

@mtelka

Description

The test_cli[Linux] and test_cli_verbose[Linux] tests fails on OpenIndiana. Please note that OpenIndiana is not Linux.

Steps to Reproduce

Run importcheck tests on OpenIndiana.

Actual result:

=================================== FAILURES ===================================
_______________________________ test_cli[Linux] ________________________________

tmp_pathplus = PosixPathPlus('/tmp/pytest-of-marcel/pytest-19/test_cli_Linux_0')
advanced_file_regression = <coincidence.regressions.AdvancedFileRegressionFixture object at 0x7fffab60b7d0>
demo_environment = PosixPathPlus('/tmp/pytest-of-marcel/pytest-19/test_cli_Linux_0/pyproject.toml')

    @pytest.mark.usefixtures("platforms")
    def test_cli(
                tmp_pathplus: PathPlus,
                advanced_file_regression: AdvancedFileRegressionFixture,
                demo_environment,
                ) -> None:

        with in_directory(tmp_pathplus):
                runner = CliRunner(mix_stderr=False)
                result: Result = runner.invoke(main, args=["--no-colour"])

        assert not result.stderr
>       advanced_file_regression.check(fix_stdout(result.stdout))
E    AssertionError: FILES DIFFER:
E    /tmp/pytest-of-marcel/pytest-19/test_cli_Linux_0/test_cli_/test_cli_Linux_.txt
E    /tmp/pytest-of-marcel/pytest-19/test_cli_Linux_0/test_cli_/test_cli_Linux_.obtained.txt
E    HTML DIFF: /tmp/pytest-of-marcel/pytest-19/test_cli_Linux_0/test_cli_/test_cli_Linux_.obtained.diff.html
E    ---
E    +++
E    @@ -5,4 +5,3 @@
E     Checking 'importcheck'...........Passed
E     Checking 'domdf_python_tools'....Passed
E     Checking 'coincidence'...........Passed
E    -Checking 'posix'.................Passed

tests/test_cli.py:101: AssertionError
___________________________ test_cli_verbose[Linux] ____________________________

tmp_pathplus = PosixPathPlus('/tmp/pytest-of-marcel/pytest-19/test_cli_verbose_Linux_0')
advanced_file_regression = <coincidence.regressions.AdvancedFileRegressionFixture object at 0x7fffabb3ffa0>
demo_environment = PosixPathPlus('/tmp/pytest-of-marcel/pytest-19/test_cli_verbose_Linux_0/pyproject.toml')

    @pytest.mark.usefixtures("platforms")
    def test_cli_verbose(
                tmp_pathplus: PathPlus,
                advanced_file_regression: AdvancedFileRegressionFixture,
                demo_environment: PathPlus,
                ) -> None:

        with in_directory(tmp_pathplus):
                runner = CliRunner(mix_stderr=False)
                result: Result = runner.invoke(main, args=["--verbose"])

        assert not result.stderr
>       advanced_file_regression.check(fix_stdout(result.stdout))
E    AssertionError: FILES DIFFER:
E    /tmp/pytest-of-marcel/pytest-19/test_cli_verbose_Linux_0/test_cli_/test_cli_verbose_Linux_.txt
E    /tmp/pytest-of-marcel/pytest-19/test_cli_verbose_Linux_0/test_cli_/test_cli_verbose_Linux_.obtained.txt
E    HTML DIFF: /tmp/pytest-of-marcel/pytest-19/test_cli_verbose_Linux_0/test_cli_/test_cli_verbose_Linux_.obtained.diff.html
E    ---
E    +++
E    @@ -5,4 +5,3 @@
E     Checking 'importcheck'...........Passed
E     Checking 'domdf_python_tools'....Passed
E     Checking 'coincidence'...........Passed
E    -Checking 'posix'.................Passed

tests/test_cli.py:117: AssertionError

Expected result:

All tests pass.

Reproduces how often:

Easily reproduced

Version

  • Operating System: OpenIndiana
  • Python: 3.9.19
  • importcheck: 0.5.0

Installation source

PyPI

Other Additional Information:

I found that with the following patch all tests pass, but I doubt it is correct and complete solution:

--- importcheck-0.5.0/tests/conftest.py.orig
+++ importcheck-0.5.0/tests/conftest.py
@@ -22,6 +22,7 @@
                        '"platform_system == \\"Windows\\"" = [ "msvcrt",]',
                        '"platform_system == \\"Linux\\"" = [ "posix",]',
                        '"platform_system == \\"Darwin\\"" = [ "plistlib",]',
+                       '"platform_system == \\"SunOS\\"" = [ "posix",]',
                        '',
                        "[tool.importcheck.config]",
                        "show = true",

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingstale

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions