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

chore: testing python test #1858

Closed
wants to merge 1 commit into from
Closed

chore: testing python test #1858

wants to merge 1 commit into from

Conversation

suztomo
Copy link
Member

@suztomo suztomo commented Sep 13, 2023

Do not merge. This pull request is Just to see the validity of the test failures in #1856

There Kokoro CI failed: https://source.cloud.google.com/results/invocations/a1603b4f-1b4d-4a21-9cfc-afdff613edd9/targets/cloud-devrel%2Fclient-libraries%2Fsynthtool%2Fpresubmit/log

=================================== FAILURES ===================================
___________________________ test_walk_through_apiary ___________________________

mock_subproc_popen = <MagicMock name='run' id='139646549292848'>

    @patch("subprocess.run")
    def test_walk_through_apiary(mock_subproc_popen):
        process_mock = Mock()
        attrs = {"communicate.return_value": ("output", "error")}
        process_mock.configure_mock(**attrs)
        mock_subproc_popen.return_value = process_mock
        dirs = node.walk_through_apiary(FIXTURES / "node_apiary", "src/apis/**/*")
        assert not mock_subproc_popen.called
>       assert re.search("src/apis/admin", dirs[0])
E       AssertionError: assert None
E        +  where None = <function search at 0x7f020127b760>('src/apis/admin', '/tmpfs/src/github/synthtool/tests/fixtures/node_apiary/src/apis/docs')
E        +    where <function search at 0x7f020127b760> = re.search

Just to see the validity of the test failures in #1856
@suztomo
Copy link
Member Author

suztomo commented Sep 13, 2023

This pull request also failed. https://source.cloud.google.com/results/invocations/d282b4af-1a9e-4dde-a773-f508f2dfcb0d/targets/cloud-devrel%2Fclient-libraries%2Fsynthtool%2Fpresubmit/log I think the test setup is broken.

=================================== FAILURES ===================================
___________________________ test_walk_through_apiary ___________________________

mock_subproc_popen = <MagicMock name='run' id='139730504940752'>

    @patch("subprocess.run")
    def test_walk_through_apiary(mock_subproc_popen):
        process_mock = Mock()
        attrs = {"communicate.return_value": ("output", "error")}
        process_mock.configure_mock(**attrs)
        mock_subproc_popen.return_value = process_mock
        dirs = node.walk_through_apiary(FIXTURES / "node_apiary", "src/apis/**/*")
        assert not mock_subproc_popen.called
>       assert re.search("src/apis/admin", dirs[0])
E       AssertionError: assert None
E        +  where None = <function search at 0x7f158d4db760>('src/apis/admin', '/tmpfs/src/github/synthtool/tests/fixtures/node_apiary/src/apis/docs')
E        +    where <function search at 0x7f158d4db760> = re.search

@suztomo suztomo closed this Sep 13, 2023
@parthea parthea reopened this Sep 14, 2023
@suztomo suztomo closed this Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants