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

feat: support new tokenless protocol #447

Merged
merged 7 commits into from
Jun 18, 2024
Merged

Conversation

joseph-sentry
Copy link
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.

Copy link

❌ 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

Copy link

❌ 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

Copy link

❌ 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

Copy link

❌ 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

Copy link

❌ 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
Copy link

❌ 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

Copy link

❌ 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

Copy link

❌ 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

Copy link

codecov bot commented May 22, 2024

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

Copy link

github-actions bot commented Jun 3, 2024

❌ 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
Copy link

github-actions bot commented Jun 3, 2024

❌ 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

Copy link

github-actions bot commented Jun 4, 2024

❌ 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
Copy link

github-actions bot commented Jun 4, 2024

❌ 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
Contributor

fixes codecov/codecov-action#1416

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
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?

Copy link

github-actions bot commented Jun 6, 2024

❌ 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
Copy link

github-actions bot commented Jun 6, 2024

❌ 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
Copy link

❌ 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
Copy link

❌ 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

Copy link

❌ 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
Copy link

❌ 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

Copy link

❌ 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)

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
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

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")

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
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

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

Copy link

@adrian-codecov adrian-codecov left a comment

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>
Copy link

❌ 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
Copy link

@adrian-codecov adrian-codecov left a comment

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)

Copy link

❌ 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
Copy link

❌ 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

Copy link

❌ 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

Copy link

❌ 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

Copy link

❌ 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>
Copy link

❌ 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
Copy link

❌ 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

Copy link

❌ 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

Copy link

❌ 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

Copy link

❌ 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

Copy link

❌ 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
Copy link

❌ 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

Copy link

❌ 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

Copy link

❌ 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

Copy link

❌ 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 merged commit 74c67b6 into main Jun 18, 2024
22 checks passed
@joseph-sentry joseph-sentry deleted the joseph/new-tokenless branch June 18, 2024 16:01
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