Skip to content

Commit

Permalink
add newsfrag; some tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenyu-ms committed Dec 6, 2024
1 parent 8957e2e commit f722a82
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions doc/newsfragments/3147_changed.another_json_lib.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Use a new JSON library ``orjson`` to improve performance when using Python 3.8 or later versions.
7 changes: 5 additions & 2 deletions tests/functional/testplan/exporters/testing/test_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,11 @@ def test_json_exporter_generating_split_report(runpath):
assert assertions["After Start"][0]["type"] == "Log"

# special values representation preserved
assert str(assertions["test_special_values"][0]["first"]) == "NaN"
assert str(assertions["test_special_values"][1]["first"]) == "-Infinity"
# NOTE: these values are of type float in old impl,
# NOTE: converted to js repr in cope with json lib change
assert assertions["test_special_values"][0]["first"] == "NaN"
assert assertions["test_special_values"][1]["first"] == "-Infinity"
assert assertions["test_special_values"][1]["second"] == "Infinity"


def test_implicit_exporter_initialization(runpath):
Expand Down
4 changes: 0 additions & 4 deletions tests/unit/testplan/report/test_testing.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
# TODO: move certain tests to tests/unit/testplan/common/report/test_base.py

import functools
import json
from collections import OrderedDict
from unittest import mock

import pytest
from boltons.iterutils import get_path

from testplan.common import entity
from testplan.common.report import (
BaseReportGroup,
ReportCategories,
RuntimeStatus,
Status,
Expand Down

0 comments on commit f722a82

Please sign in to comment.