Skip to content

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

@rmadsen-ks

Description

@rmadsen-ks

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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy