Improve bson code coverage

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • Python Drivers
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      Context

      Currently we're only covering about 80% of bson/_init_.py and 70% of bson/datetime_ms.py. There is some low-hanging fruit of coverage improvements that can be made by adding tests to test/test_bson.py. Local verification can be done by running:

      rm bson/*.so
      NO_EXT=1 COVERAGE=1 just setup-tests
      just run-tests test/test_bson.py
      uv tool run coverage html
      

      Definition of done

      Try to get 90% or higher coverage in bson/_init_.py and bson/datetime_ms.py.

      Pitfalls

      None

            Assignee:
            Alex Clark
            Reporter:
            Steve Silvester
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: