Skip to content

feat: support new tokenless protocol#447

Merged
joseph-sentry merged 7 commits into
mainfrom
joseph/new-tokenless
Jun 18, 2024
Merged

feat: support new tokenless protocol#447
joseph-sentry merged 7 commits into
mainfrom
joseph/new-tokenless

Conversation

@joseph-sentry

Copy link
Copy Markdown
Contributor

it's no longer necessary for us to use the
X-Tokenless header to provide tokenless
information to the API, the information in the
regular request bodies will suffice.

@github-actions

Copy link
Copy Markdown

❌ Failed Test Results:

Completed 693 tests with 2 failed, 691 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
> assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = <function Calculator.divide at 0x104c9eb90>(1, 2)
E + where <function Calculator.divide at 0x104c9eb90> = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError
Testsuite:
tests.services.commit.test_commit_service::test_commit_sender_with_forked_repo

Test name:
pytest
self = <MagicMock name='send_post_request' id='140684238398368'>, args = ()
kwargs = {'data': {'branch': 'user_forked_repo/codecov-cli:branch', 'commitid': 'commit_sha', 'parent_commit_id': 'parent_sha',...epo/codecov-cli', 'X-Tokenless-PR': '1'}, 'url': 'https://api.codecov..../upload/github/codecov::::codecov-cli/commits'}
expected = call(url='https://api.codecov..../upload/github/codecov::::codecov-cli/commits', data={'commitid': 'commit_sha', 'paren...'user_forked_repo/codecov-cli:branch'}, headers={'X-Tokenless': 'user_forked_repo/codecov-cli', 'X-Tokenless-PR': '1'})
actual = call(url='https://api.codecov..../upload/github/codecov::::codecov-cli/commits', data={'commitid': 'commit_sha', 'parent_commit_id': 'parent_sha', 'pullid': '1', 'branch': 'branch'}, headers=None)
_error_message = <function NonCallableMock.assert_called_with.<locals>._error_message at 0x7ff399f28670>
cause = None

def assert_called_with(self, /, *args, **kwargs):
"""assert that the last call was made with the specified arguments.

Raises an AssertionError if the args and keyword args passed in are
different to the last call to the mock."""
if self.call_args is None:
expected = self._format_mock_call_signature(args, kwargs)
actual = 'not called.'
error_message = ('expected call not found.\nExpected: %s\nActual: %s'
% (expected, actual))
raise AssertionError(error_message)

def _error_message():
msg = self._format_mock_failure_message(args, kwargs)
return msg
expected = self._call_matcher(_Call((args, kwargs), two=True))
actual = self._call_matcher(self.call_args)
if actual != expected:
cause = expected if isinstance(expected, Exception) else None
> raise AssertionError(_error_message()) from cause
E AssertionError: expected call not found.
E Expected: send_post_request(url='https://api.codecov..../upload/github/codecov::::codecov-cli/commits', data={'commitid': 'commit_sha', 'parent_commit_id': 'parent_sha', 'pullid': '1', 'branch': 'user_forked_repo/codecov-cli:branch'}, headers={'X-Tokenless': 'user_forked_repo/codecov-cli', 'X-Tokenless-PR': '1'})
E Actual: send_post_request(url='https://api.codecov..../upload/github/codecov::::codecov-cli/commits', data={'commitid': 'commit_sha', 'parent_commit_id': 'parent_sha', 'pullid': '1', 'branch': 'branch'}, headers=None)

.../hostedtoolcache/Python/3.9.19.../x64/lib/python3.9/unittest/mock.py:907: AssertionError

During handling of the above exception, another exception occurred:

mocker = <pytest_mock.plugin.MockerFixture object at 0x7ff39a042940>

def test_commit_sender_with_forked_repo(mocker):
mocked_response = mocker.patch(
"codecov_cli.services.commit.send_post_request",
return_value=mocker.MagicMock(status_code=200, text="success"),
)

def mock_request(*args, headers={}, **kwargs):
assert headers["X-GitHub-Api-Version"] == "2022-11-28"
res = {
"url": "https://api.github..../codecov-cli/pulls/1",
"head": {
"sha": "123",
"label": "codecov-cli:branch",
"ref": "branch",
"repo": {"full_name": "user_forked_repo/codecov-cli"},
},
"base": {
"sha": "123",
"label": "codecov-cli:main",
"ref": "main",
"repo": {"full_name": "codecov/codecov-cli"},
},
}
response = Response()
response.status_code = 200
response._content = json.dumps(res).encode("utf-8")
return response

mocker.patch.object(
requests,
"get",
side_effect=mock_request,
)
res = send_commit_data(
"commit_sha",
"parent_sha",
"1",
"branch",
"codecov::::codecov-cli",
None,
"github",
None,
)
> mocked_response.assert_called_with(
url="https://api.codecov..../upload/github/codecov::::codecov-cli/commits",
data={
"commitid": "commit_sha",
"parent_commit_id": "parent_sha",
"pullid": "1",
"branch": "user_forked_repo/codecov-cli:branch",
},
headers={"X-Tokenless": "user_forked_repo/codecov-cli", "X-Tokenless-PR": "1"},
)
E AssertionError: expected call not found.
E Expected: send_post_request(url='https://api.codecov..../upload/github/codecov::::codecov-cli/commits', data={'commitid': 'commit_sha', 'parent_commit_id': 'parent_sha', 'pullid': '1', 'branch': 'user_forked_repo/codecov-cli:branch'}, headers={'X-Tokenless': 'user_forked_repo/codecov-cli', 'X-Tokenless-PR': '1'})
E Actual: send_post_request(url='https://api.codecov..../upload/github/codecov::::codecov-cli/commits', data={'commitid': 'commit_sha', 'parent_commit_id': 'parent_sha', 'pullid': '1', 'branch': 'branch'}, headers=None)
E
E pytest introspection follows:
E
E Kwargs:
E assert {'data': {'br...-cli/commits'} == {'data': {'br...-cli/commits'}
E Omitting 1 identical items, use -vv to show
E Differing items:
E {'data': {'branch': 'branch', 'commitid': 'commit_sha', 'parent_commit_id': 'parent_sha', 'pullid': '1'}} != {'data': {'branch': 'user_forked_repo/codecov-cli:branch', 'commitid': 'commit_sha', 'parent_commit_id': 'parent_sha', 'pullid': '1'}}
E {'headers': None} != {'headers': {'X-Tokenless': 'user_forked_repo/codecov-cli', 'X-Tokenless-PR': '1'}}
E Full diff:
E {
E - 'data': {'branch': 'user_forked_repo/codecov-cli:branch',
E + 'data': {'branch': 'branch',
E 'commitid': 'commit_sha',
E 'parent_commit_id': 'parent_sha',
E 'pullid': '1'},
E + 'headers': None,
E - 'headers': {'X-Tokenless': 'user_forked_repo/codecov-cli',
E - 'X-Tokenless-PR': '1'},
E 'url': 'https://api.codecov..../upload/github/codecov::::codecov-cli/commits',
E }

.../services/commit/test_commit_service.py:190: AssertionError

@github-actions

Copy link
Copy Markdown

❌ Failed Test Results:

Completed 693 tests with 2 failed, 691 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
> assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = <function Calculator.divide at 0x104c9eb90>(1, 2)
E + where <function Calculator.divide at 0x104c9eb90> = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError
Testsuite:
tests.services.commit.test_commit_service::test_commit_sender_with_forked_repo

Test name:
pytest
self = <MagicMock name='send_post_request' id='139891383112912'>, args = ()
kwargs = {'data': {'branch': 'user_forked_repo/codecov-cli:branch', 'commitid': 'commit_sha', 'parent_commit_id': 'parent_sha',...epo/codecov-cli', 'X-Tokenless-PR': '1'}, 'url': 'https://api.codecov..../upload/github/codecov::::codecov-cli/commits'}
expected = call(url='https://api.codecov..../upload/github/codecov::::codecov-cli/commits', data={'commitid': 'commit_sha', 'paren...'user_forked_repo/codecov-cli:branch'}, headers={'X-Tokenless': 'user_forked_repo/codecov-cli', 'X-Tokenless-PR': '1'})
actual = call(url='https://api.codecov..../upload/github/codecov::::codecov-cli/commits', data={'commitid': 'commit_sha', 'parent_commit_id': 'parent_sha', 'pullid': '1', 'branch': 'branch'}, headers=None)
_error_message = <function NonCallableMock.assert_called_with.<locals>._error_message at 0x7f3b00319a80>
cause = None

def assert_called_with(self, /, *args, **kwargs):
"""assert that the last call was made with the specified arguments.

Raises an AssertionError if the args and keyword args passed in are
different to the last call to the mock."""
if self.call_args is None:
expected = self._format_mock_call_signature(args, kwargs)
actual = 'not called.'
error_message = ('expected call not found.\nExpected: %s\n Actual: %s'
% (expected, actual))
raise AssertionError(error_message)

def _error_message():
msg = self._format_mock_failure_message(args, kwargs)
return msg
expected = self._call_matcher(_Call((args, kwargs), two=True))
actual = self._call_matcher(self.call_args)
if actual != expected:
cause = expected if isinstance(expected, Exception) else None
> raise AssertionError(_error_message()) from cause
E AssertionError: expected call not found.
E Expected: send_post_request(url='https://api.codecov..../upload/github/codecov::::codecov-cli/commits', data={'commitid': 'commit_sha', 'parent_commit_id': 'parent_sha', 'pullid': '1', 'branch': 'user_forked_repo/codecov-cli:branch'}, headers={'X-Tokenless': 'user_forked_repo/codecov-cli', 'X-Tokenless-PR': '1'})
E Actual: send_post_request(url='https://api.codecov..../upload/github/codecov::::codecov-cli/commits', data={'commitid': 'commit_sha', 'parent_commit_id': 'parent_sha', 'pullid': '1', 'branch': 'branch'}, headers=None)

.../hostedtoolcache/Python/3.11.9.../x64/lib/python3.11/unittest/mock.py:939: AssertionError

During handling of the above exception, another exception occurred:

mocker = <pytest_mock.plugin.MockerFixture object at 0x7f3b0033fa10>

def test_commit_sender_with_forked_repo(mocker):
mocked_response = mocker.patch(
"codecov_cli.services.commit.send_post_request",
return_value=mocker.MagicMock(status_code=200, text="success"),
)

def mock_request(*args, headers={}, **kwargs):
assert headers["X-GitHub-Api-Version"] == "2022-11-28"
res = {
"url": "https://api.github..../codecov-cli/pulls/1",
"head": {
"sha": "123",
"label": "codecov-cli:branch",
"ref": "branch",
"repo": {"full_name": "user_forked_repo/codecov-cli"},
},
"base": {
"sha": "123",
"label": "codecov-cli:main",
"ref": "main",
"repo": {"full_name": "codecov/codecov-cli"},
},
}
response = Response()
response.status_code = 200
response._content = json.dumps(res).encode("utf-8")
return response

mocker.patch.object(
requests,
"get",
side_effect=mock_request,
)
res = send_commit_data(
"commit_sha",
"parent_sha",
"1",
"branch",
"codecov::::codecov-cli",
None,
"github",
None,
)
> mocked_response.assert_called_with(
url="https://api.codecov..../upload/github/codecov::::codecov-cli/commits",
data={
"commitid": "commit_sha",
"parent_commit_id": "parent_sha",
"pullid": "1",
"branch": "user_forked_repo/codecov-cli:branch",
},
headers={"X-Tokenless": "user_forked_repo/codecov-cli", "X-Tokenless-PR": "1"},
)
E AssertionError: expected call not found.
E Expected: send_post_request(url='https://api.codecov..../upload/github/codecov::::codecov-cli/commits', data={'commitid': 'commit_sha', 'parent_commit_id': 'parent_sha', 'pullid': '1', 'branch': 'user_forked_repo/codecov-cli:branch'}, headers={'X-Tokenless': 'user_forked_repo/codecov-cli', 'X-Tokenless-PR': '1'})
E Actual: send_post_request(url='https://api.codecov..../upload/github/codecov::::codecov-cli/commits', data={'commitid': 'commit_sha', 'parent_commit_id': 'parent_sha', 'pullid': '1', 'branch': 'branch'}, headers=None)
E
E pytest introspection follows:
E
E Kwargs:
E assert {'data': {'br...-cli/commits'} == {'data': {'br...-cli/commits'}
E Omitting 1 identical items, use -vv to show
E Differing items:
E {'headers': None} != {'headers': {'X-Tokenless': 'user_forked_repo/codecov-cli', 'X-Tokenless-PR': '1'}}
E {'data': {'branch': 'branch', 'commitid': 'commit_sha', 'parent_commit_id': 'parent_sha', 'pullid': '1'}} != {'data': {'branch': 'user_forked_repo/codecov-cli:branch', 'commitid': 'commit_sha', 'parent_commit_id': 'parent_sha', 'pullid': '1'}}
E Full diff:
E {
E - 'data': {'branch': 'user_forked_repo/codecov-cli:branch',
E + 'data': {'branch': 'branch',
E 'commitid': 'commit_sha',
E 'parent_commit_id': 'parent_sha',
E 'pullid': '1'},
E + 'headers': None,
E - 'headers': {'X-Tokenless': 'user_forked_repo/codecov-cli',
E - 'X-Tokenless-PR': '1'},
E 'url': 'https://api.codecov..../upload/github/codecov::::codecov-cli/commits',
E }

.../services/commit/test_commit_service.py:190: AssertionError

@github-actions

Copy link
Copy Markdown

❌ Failed Test Results:

Completed 693 tests with 2 failed, 691 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
tests.services.commit.test_commit_service::test_commit_sender_with_forked_repo

Test name:
pytest
self = <MagicMock name='send_post_request' id='140494929927040'>, args = ()
kwargs = {'data': {'branch': 'user_forked_repo/codecov-cli:branch', 'commitid': 'commit_sha', 'parent_commit_id': 'parent_sha',...epo/codecov-cli', 'X-Tokenless-PR': '1'}, 'url': 'https://api.codecov..../upload/github/codecov::::codecov-cli/commits'}
expected = ((), {'data': {'branch': 'user_forked_repo/codecov-cli:branch', 'commitid': 'commit_sha', 'parent_commit_id': 'parent_...po/codecov-cli', 'X-Tokenless-PR': '1'}, 'url': 'https://api.codecov..../upload/github/codecov::::codecov-cli/commits'})
actual = call(url='https://api.codecov..../upload/github/codecov::::codecov-cli/commits', data={'commitid': 'commit_sha', 'parent_commit_id': 'parent_sha', 'pullid': '1', 'branch': 'branch'}, headers=None)
_error_message = <function NonCallableMock.assert_called_with.<locals>._error_message at 0x7fc786332160>
cause = None

def assert_called_with(self, /, *args, **kwargs):
"""assert that the last call was made with the specified arguments.

Raises an AssertionError if the args and keyword args passed in are
different to the last call to the mock."""
if self.call_args is None:
expected = self._format_mock_call_signature(args, kwargs)
actual = 'not called.'
error_message = ('expected call not found.\nExpected: %s\nActual: %s'
% (expected, actual))
raise AssertionError(error_message)

def _error_message():
msg = self._format_mock_failure_message(args, kwargs)
return msg
expected = self._call_matcher((args, kwargs))
actual = self._call_matcher(self.call_args)
if expected != actual:
cause = expected if isinstance(expected, Exception) else None
> raise AssertionError(_error_message()) from cause
E AssertionError: expected call not found.
E Expected: send_post_request(url='https://api.codecov..../upload/github/codecov::::codecov-cli/commits', data={'commitid': 'commit_sha', 'parent_commit_id': 'parent_sha', 'pullid': '1', 'branch': 'user_forked_repo/codecov-cli:branch'}, headers={'X-Tokenless': 'user_forked_repo/codecov-cli', 'X-Tokenless-PR': '1'})
E Actual: send_post_request(url='https://api.codecov..../upload/github/codecov::::codecov-cli/commits', data={'commitid': 'commit_sha', 'parent_commit_id': 'parent_sha', 'pullid': '1', 'branch': 'branch'}, headers=None)

.../hostedtoolcache/Python/3.8.18.../x64/lib/python3.8/unittest/mock.py:913: AssertionError

During handling of the above exception, another exception occurred:

mocker = <pytest_mock.plugin.MockerFixture object at 0x7fc7866ad370>

def test_commit_sender_with_forked_repo(mocker):
mocked_response = mocker.patch(
"codecov_cli.services.commit.send_post_request",
return_value=mocker.MagicMock(status_code=200, text="success"),
)

def mock_request(*args, headers={}, **kwargs):
assert headers["X-GitHub-Api-Version"] == "2022-11-28"
res = {
"url": "https://api.github..../codecov-cli/pulls/1",
"head": {
"sha": "123",
"label": "codecov-cli:branch",
"ref": "branch",
"repo": {"full_name": "user_forked_repo/codecov-cli"},
},
"base": {
"sha": "123",
"label": "codecov-cli:main",
"ref": "main",
"repo": {"full_name": "codecov/codecov-cli"},
},
}
response = Response()
response.status_code = 200
response._content = json.dumps(res).encode("utf-8")
return response

mocker.patch.object(
requests,
"get",
side_effect=mock_request,
)
res = send_commit_data(
"commit_sha",
"parent_sha",
"1",
"branch",
"codecov::::codecov-cli",
None,
"github",
None,
)
> mocked_response.assert_called_with(
url="https://api.codecov..../upload/github/codecov::::codecov-cli/commits",
data={
"commitid": "commit_sha",
"parent_commit_id": "parent_sha",
"pullid": "1",
"branch": "user_forked_repo/codecov-cli:branch",
},
headers={"X-Tokenless": "user_forked_repo/codecov-cli", "X-Tokenless-PR": "1"},
)
E AssertionError: expected call not found.
E Expected: send_post_request(url='https://api.codecov..../upload/github/codecov::::codecov-cli/commits', data={'commitid': 'commit_sha', 'parent_commit_id': 'parent_sha', 'pullid': '1', 'branch': 'user_forked_repo/codecov-cli:branch'}, headers={'X-Tokenless': 'user_forked_repo/codecov-cli', 'X-Tokenless-PR': '1'})
E Actual: send_post_request(url='https://api.codecov..../upload/github/codecov::::codecov-cli/commits', data={'commitid': 'commit_sha', 'parent_commit_id': 'parent_sha', 'pullid': '1', 'branch': 'branch'}, headers=None)
E
E pytest introspection follows:
E
E Kwargs:
E assert {'data': {'br...-cli/commits'} == {'data': {'br...-cli/commits'}
E Omitting 1 identical items, use -vv to show
E Differing items:
E {'headers': None} != {'headers': {'X-Tokenless': 'user_forked_repo/codecov-cli', 'X-Tokenless-PR': '1'}}
E {'data': {'branch': 'branch', 'commitid': 'commit_sha', 'parent_commit_id': 'parent_sha', 'pullid': '1'}} != {'data': {'branch': 'user_forked_repo/codecov-cli:branch', 'commitid': 'commit_sha', 'parent_commit_id': 'parent_sha', 'pullid': '1'}}
E Full diff:
E {
E - 'data': {'branch': 'user_forked_repo/codecov-cli:branch',
E + 'data': {'branch': 'branch',
E 'commitid': 'commit_sha',
E 'parent_commit_id': 'parent_sha',
E 'pullid': '1'},
E + 'headers': None,
E - 'headers': {'X-Tokenless': 'user_forked_repo/codecov-cli',
E - 'X-Tokenless-PR': '1'},
E 'url': 'https://api.codecov..../upload/github/codecov::::codecov-cli/commits',
E }

.../services/commit/test_commit_service.py:190: AssertionError
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
> assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = <function Calculator.divide at 0x104c9eb90>(1, 2)
E + where <function Calculator.divide at 0x104c9eb90> = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

@github-actions

Copy link
Copy Markdown

❌ Failed Test Results:

Completed 693 tests with 2 failed, 691 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
> assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = <function Calculator.divide at 0x104c9eb90>(1, 2)
E + where <function Calculator.divide at 0x104c9eb90> = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError
Testsuite:
tests.services.commit.test_commit_service::test_commit_sender_with_forked_repo

Test name:
pytest
self = <MagicMock name='send_post_request' id='140473859483072'>, args = ()
kwargs = {'data': {'branch': 'user_forked_repo/codecov-cli:branch', 'commitid': 'commit_sha', 'parent_commit_id': 'parent_sha',...epo/codecov-cli', 'X-Tokenless-PR': '1'}, 'url': 'https://api.codecov..../upload/github/codecov::::codecov-cli/commits'}
expected = call(url='https://api.codecov..../upload/github/codecov::::codecov-cli/commits', data={'commitid': 'commit_sha', 'paren...'user_forked_repo/codecov-cli:branch'}, headers={'X-Tokenless': 'user_forked_repo/codecov-cli', 'X-Tokenless-PR': '1'})
actual = call(url='https://api.codecov..../upload/github/codecov::::codecov-cli/commits', data={'commitid': 'commit_sha', 'parent_commit_id': 'parent_sha', 'pullid': '1', 'branch': 'branch'}, headers=None)
_error_message = <function NonCallableMock.assert_called_with.<locals>._error_message at 0x7fc29e7a7370>
cause = None

def assert_called_with(self, /, *args, **kwargs):
"""assert that the last call was made with the specified arguments.

Raises an AssertionError if the args and keyword args passed in are
different to the last call to the mock."""
if self.call_args is None:
expected = self._format_mock_call_signature(args, kwargs)
actual = 'not called.'
error_message = ('expected call not found.\nExpected: %s\nActual: %s'
% (expected, actual))
raise AssertionError(error_message)

def _error_message():
msg = self._format_mock_failure_message(args, kwargs)
return msg
expected = self._call_matcher(_Call((args, kwargs), two=True))
actual = self._call_matcher(self.call_args)
if actual != expected:
cause = expected if isinstance(expected, Exception) else None
> raise AssertionError(_error_message()) from cause
E AssertionError: expected call not found.
E Expected: send_post_request(url='https://api.codecov..../upload/github/codecov::::codecov-cli/commits', data={'commitid': 'commit_sha', 'parent_commit_id': 'parent_sha', 'pullid': '1', 'branch': 'user_forked_repo/codecov-cli:branch'}, headers={'X-Tokenless': 'user_forked_repo/codecov-cli', 'X-Tokenless-PR': '1'})
E Actual: send_post_request(url='https://api.codecov..../upload/github/codecov::::codecov-cli/commits', data={'commitid': 'commit_sha', 'parent_commit_id': 'parent_sha', 'pullid': '1', 'branch': 'branch'}, headers=None)

.../hostedtoolcache/Python/3.10.14.../x64/lib/python3.10/unittest/mock.py:929: AssertionError

During handling of the above exception, another exception occurred:

mocker = <pytest_mock.plugin.MockerFixture object at 0x7fc29e72ec20>

def test_commit_sender_with_forked_repo(mocker):
mocked_response = mocker.patch(
"codecov_cli.services.commit.send_post_request",
return_value=mocker.MagicMock(status_code=200, text="success"),
)

def mock_request(*args, headers={}, **kwargs):
assert headers["X-GitHub-Api-Version"] == "2022-11-28"
res = {
"url": "https://api.github..../codecov-cli/pulls/1",
"head": {
"sha": "123",
"label": "codecov-cli:branch",
"ref": "branch",
"repo": {"full_name": "user_forked_repo/codecov-cli"},
},
"base": {
"sha": "123",
"label": "codecov-cli:main",
"ref": "main",
"repo": {"full_name": "codecov/codecov-cli"},
},
}
response = Response()
response.status_code = 200
response._content = json.dumps(res).encode("utf-8")
return response

mocker.patch.object(
requests,
"get",
side_effect=mock_request,
)
res = send_commit_data(
"commit_sha",
"parent_sha",
"1",
"branch",
"codecov::::codecov-cli",
None,
"github",
None,
)
> mocked_response.assert_called_with(
url="https://api.codecov..../upload/github/codecov::::codecov-cli/commits",
data={
"commitid": "commit_sha",
"parent_commit_id": "parent_sha",
"pullid": "1",
"branch": "user_forked_repo/codecov-cli:branch",
},
headers={"X-Tokenless": "user_forked_repo/codecov-cli", "X-Tokenless-PR": "1"},
)
E AssertionError: expected call not found.
E Expected: send_post_request(url='https://api.codecov..../upload/github/codecov::::codecov-cli/commits', data={'commitid': 'commit_sha', 'parent_commit_id': 'parent_sha', 'pullid': '1', 'branch': 'user_forked_repo/codecov-cli:branch'}, headers={'X-Tokenless': 'user_forked_repo/codecov-cli', 'X-Tokenless-PR': '1'})
E Actual: send_post_request(url='https://api.codecov..../upload/github/codecov::::codecov-cli/commits', data={'commitid': 'commit_sha', 'parent_commit_id': 'parent_sha', 'pullid': '1', 'branch': 'branch'}, headers=None)
E
E pytest introspection follows:
E
E Kwargs:
E assert {'data': {'br...-cli/commits'} == {'data': {'br...-cli/commits'}
E Omitting 1 identical items, use -vv to show
E Differing items:
E {'headers': None} != {'headers': {'X-Tokenless': 'user_forked_repo/codecov-cli', 'X-Tokenless-PR': '1'}}
E {'data': {'branch': 'branch', 'commitid': 'commit_sha', 'parent_commit_id': 'parent_sha', 'pullid': '1'}} != {'data': {'branch': 'user_forked_repo/codecov-cli:branch', 'commitid': 'commit_sha', 'parent_commit_id': 'parent_sha', 'pullid': '1'}}
E Full diff:
E {
E - 'data': {'branch': 'user_forked_repo/codecov-cli:branch',
E + 'data': {'branch': 'branch',
E 'commitid': 'commit_sha',
E 'parent_commit_id': 'parent_sha',
E 'pullid': '1'},
E + 'headers': None,
E - 'headers': {'X-Tokenless': 'user_forked_repo/codecov-cli',
E - 'X-Tokenless-PR': '1'},
E 'url': 'https://api.codecov..../upload/github/codecov::::codecov-cli/commits',
E }

.../services/commit/test_commit_service.py:190: AssertionError

@github-actions

Copy link
Copy Markdown

❌ Failed Test Results:

Completed 693 tests with 1 failed, 692 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
> assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = <function Calculator.divide at 0x104c9eb90>(1, 2)
E + where <function Calculator.divide at 0x104c9eb90> = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

3 similar comments
@github-actions

Copy link
Copy Markdown

❌ Failed Test Results:

Completed 693 tests with 1 failed, 692 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
> assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = <function Calculator.divide at 0x104c9eb90>(1, 2)
E + where <function Calculator.divide at 0x104c9eb90> = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

@github-actions

Copy link
Copy Markdown

❌ Failed Test Results:

Completed 693 tests with 1 failed, 692 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
> assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = <function Calculator.divide at 0x104c9eb90>(1, 2)
E + where <function Calculator.divide at 0x104c9eb90> = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

@github-actions

Copy link
Copy Markdown

❌ Failed Test Results:

Completed 693 tests with 1 failed, 692 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
> assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = <function Calculator.divide at 0x104c9eb90>(1, 2)
E + where <function Calculator.divide at 0x104c9eb90> = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

@codecov

codecov Bot commented May 22, 2024

Copy link
Copy Markdown

Test Failures Detected: Due to failing tests, we cannot provide coverage reports at this time.

❌ Failed Test Results:

Completed 3455 tests with 5 failed, 3450 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
pytest

Test name:
api.temp.calculator.test_calculator::test_divide

Envs:
- python3.8
def
test_divide():
> assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = <function Calculator.divide at 0x104c9eb90>(1, 2)
E + where <function Calculator.divide at 0x104c9eb90> = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError
Testsuite:
pytest

Test name:
api.temp.calculator.test_calculator::test_divide

Envs:
- python3.9
def
test_divide():
> assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = <function Calculator.divide at 0x104c9eb90>(1, 2)
E + where <function Calculator.divide at 0x104c9eb90> = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError
Testsuite:
pytest

Test name:
api.temp.calculator.test_calculator::test_divide

Envs:
- python3.12
def
test_divide():
> assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = <function Calculator.divide at 0x104c9eb90>(1, 2)
E + where <function Calculator.divide at 0x104c9eb90> = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError
Testsuite:
pytest

Test name:
api.temp.calculator.test_calculator::test_divide

Envs:
- python3.10
def
test_divide():
> assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = <function Calculator.divide at 0x104c9eb90>(1, 2)
E + where <function Calculator.divide at 0x104c9eb90> = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError
Testsuite:
pytest

Test name:
api.temp.calculator.test_calculator::test_divide

Envs:
- python3.11
def
test_divide():
> assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = <function Calculator.divide at 0x104c9eb90>(1, 2)
E + where <function Calculator.divide at 0x104c9eb90> = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

@joseph-sentry joseph-sentry force-pushed the joseph/new-tokenless branch from b03ad4a to 0de0517 Compare June 3, 2024 15:30
@github-actions

github-actions Bot commented Jun 3, 2024

Copy link
Copy Markdown

❌ Failed Test Results:

Completed 693 tests with 1 failed, 692 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

1 similar comment
@github-actions

github-actions Bot commented Jun 3, 2024

Copy link
Copy Markdown

❌ Failed Test Results:

Completed 693 tests with 1 failed, 692 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

@github-actions

github-actions Bot commented Jun 4, 2024

Copy link
Copy Markdown

❌ Failed Test Results:

Completed 691 tests with 1 failed, 690 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

1 similar comment
@github-actions

github-actions Bot commented Jun 4, 2024

Copy link
Copy Markdown

❌ Failed Test Results:

Completed 691 tests with 1 failed, 690 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

@thomasrockhu-codecov

Copy link
Copy Markdown
Contributor

fixes codecov/codecov-action#1416

Comment thread codecov_cli/services/commit/__init__.py Outdated
if is_fork_pr(pull_dict):
headers = {"X-Tokenless": pull_dict["head"]["slug"], "X-Tokenless-PR": pr}
branch = pull_dict["head"]["slug"] + ":" + branch
tokenless = os.environ.get

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is missing an arg?

@github-actions

github-actions Bot commented Jun 6, 2024

Copy link
Copy Markdown

❌ Failed Test Results:

Completed 691 tests with 1 failed, 690 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

1 similar comment
@github-actions

github-actions Bot commented Jun 6, 2024

Copy link
Copy Markdown

❌ Failed Test Results:

Completed 691 tests with 1 failed, 690 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

@joseph-sentry joseph-sentry requested a review from a team June 11, 2024 15:07
@github-actions

Copy link
Copy Markdown

❌ Failed Test Results:

Completed 691 tests with 1 failed, 690 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

1 similar comment
@github-actions

Copy link
Copy Markdown

❌ Failed Test Results:

Completed 691 tests with 1 failed, 690 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

@joseph-sentry joseph-sentry force-pushed the joseph/new-tokenless branch from 568ac88 to e5f9f17 Compare June 17, 2024 13:08
@github-actions

Copy link
Copy Markdown

❌ Failed Test Results:

Completed 691 tests with 1 failed, 690 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

2 similar comments
@github-actions

Copy link
Copy Markdown

❌ Failed Test Results:

Completed 691 tests with 1 failed, 690 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

@github-actions

Copy link
Copy Markdown

❌ Failed Test Results:

Completed 691 tests with 1 failed, 690 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

}
else:
headers = get_token_header_or_fail(token)
headers = get_token_header(token)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are some commands using get_token_header vs get_token_header_or_fail? How do we know when to use which?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get_token_header is for supporting tokenless, if someone tries to upload using tokenless get_token_header_or_fail just fails and prevents them from doing anything

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh that makes sense, worth leaving another comment here? 😅

if is_fork_pr(pull_dict):
headers = {"X-Tokenless": pull_dict["head"]["slug"], "X-Tokenless-PR": pr}
branch = pull_dict["head"]["slug"] + ":" + branch
tokenless = os.environ.get("TOKENLESS")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gonna leave a comment explaining this but this is how the CLI receives the username of the user to whom the fork belongs to and the branch name from the action

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that makes sense, a comment here would be pretty helpful thanks

@adrian-codecov adrian-codecov left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some questions, otherwise very excited for this 👀

We no longer have to send the X-Tokenless header
anymore.

Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>
we no longer want to make the github API call to check if the current
ref we are uploading from is a PR to determine what to set the tokenless
header to. It's no longer necessary and all that is needed for tokenless
is to pass the correct  branch name (containing a ':') to the create
commit step so that tokenless works. The CLI will automatically check if
the TOKENLESS env var has been set by the action. The action will set
this env var when it detects it's running on a fork.

Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>
@github-actions

Copy link
Copy Markdown

❌ Failed Test Results:

Completed 691 tests with 1 failed, 690 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

adrian-codecov
adrian-codecov previously approved these changes Jun 17, 2024

@adrian-codecov adrian-codecov left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm! Did you confirm with @thomasrockhu-codecov that this is covered? #447 (comment)

@github-actions

Copy link
Copy Markdown

❌ Failed Test Results:

Completed 691 tests with 1 failed, 690 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

4 similar comments
@github-actions

Copy link
Copy Markdown

❌ Failed Test Results:

Completed 691 tests with 1 failed, 690 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

@github-actions

Copy link
Copy Markdown

❌ Failed Test Results:

Completed 691 tests with 1 failed, 690 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

@github-actions

Copy link
Copy Markdown

❌ Failed Test Results:

Completed 691 tests with 1 failed, 690 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

@github-actions

Copy link
Copy Markdown

❌ Failed Test Results:

Completed 691 tests with 1 failed, 690 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>
@github-actions

Copy link
Copy Markdown

❌ Failed Test Results:

Completed 691 tests with 1 failed, 690 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

4 similar comments
@github-actions

Copy link
Copy Markdown

❌ Failed Test Results:

Completed 691 tests with 1 failed, 690 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

@github-actions

Copy link
Copy Markdown

❌ Failed Test Results:

Completed 691 tests with 1 failed, 690 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

@github-actions

Copy link
Copy Markdown

❌ Failed Test Results:

Completed 691 tests with 1 failed, 690 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

@github-actions

Copy link
Copy Markdown

❌ Failed Test Results:

Completed 691 tests with 1 failed, 690 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

@github-actions

Copy link
Copy Markdown

❌ Failed Test Results:

Completed 691 tests with 1 failed, 690 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

4 similar comments
@github-actions

Copy link
Copy Markdown

❌ Failed Test Results:

Completed 691 tests with 1 failed, 690 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

@github-actions

Copy link
Copy Markdown

❌ Failed Test Results:

Completed 691 tests with 1 failed, 690 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

@github-actions

Copy link
Copy Markdown

❌ Failed Test Results:

Completed 691 tests with 1 failed, 690 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

@github-actions

Copy link
Copy Markdown

❌ Failed Test Results:

Completed 691 tests with 1 failed, 690 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

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.

4 participants