Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix test_legacy_correct_metadata_response on x86 arch #1718

Conversation

stanislavlevin
Copy link
Contributor

@stanislavlevin stanislavlevin commented Feb 19, 2019

The problem is that the type of required operation result is
"long".

>>> type(278251978 & 0xffffffff)
<type 'long'>

However, by default "format" method uses format():

>>> (278251978 & 0xffffffff).__format__('')
'278251978'

So, let's compare things using the same engine:

>>> "{!r}".format(278251978 & 0xffffffff)
'278251978L'

Fixes: #1717


This change is Reviewable

The problem is that the type of required operation result is
"long".

```
>>> type(278251978 & 0xffffffff)
<type 'long'>
```

However, by default "format" method uses __format__():

```
>>> (278251978 & 0xffffffff).__format__('')
'278251978'
```

So, let's compare things using the same engine:

```
>>> "{!r}".format(278251978 & 0xffffffff)
'278251978L'
```

Fixes: dpkp#1717
Signed-off-by: Stanislav Levin <slev@altlinux.org>
@tvoinarovskyi
Copy link
Collaborator

Cool, thanks

@tvoinarovskyi tvoinarovskyi merged commit 03664eb into dpkp:master Feb 21, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants