FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

PyInt.ToString returns wrong strings for values between 128 and 256 · Issue #1990 · pythonnet/pythonnet · GitHub

PyInt.ToString returns wrong strings for values between 128 and 256 #1990

Description

Environment

  • Pythonnet version: 3.0.0-rc6
  • Python version: 3.7
  • Operating System: Windows 10
  • .NET Runtime: .net 6

This test fails with error -56 != 200

def test_object_string_format():
    """Test int to string."""
    from System import String
    integer_value = 200
    string_value = String.Format("{0}", integer_value)
    assert string_value == "200", f"{string_value} != ""200"""

Solution coming up

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL