CLN/TST: Cleanup tests in test_ujson.py
State: closed

* Actually test the outputs
* Add more parameterization
* Take advantage of `pytest` features, such as exception contexts

This test module really needed an update 😄 

Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: IO JSON
description: read_json, to_json, json_normalize
name: Clean

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/21739?src=pr&el=h1) Report
> Merging [#21739](https://codecov.io/gh/pandas-dev/pandas/pull/21739?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/10709762e95be2b98d68b95db93a287ee5af74d4?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/21739/graphs/tree.svg?height=150&width=650&token=eZ4WkYLtcO&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/21739?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master   #21739   +/-   ##
=======================================
  Coverage   91.92%   91.92%           
=======================================
  Files         158      158           
  Lines       49705    49705           
=======================================
  Hits        45693    45693           
  Misses       4012     4012
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.3% <ø> (ø)` | :arrow_up: |
| #single | `41.99% <ø> (ø)` | :arrow_up: |


------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/21739?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/21739?src=pr&el=footer). Last update [1070976...d5f0f03](https://codecov.io/gh/pandas-dev/pandas/pull/21739?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/21739?src=pr&el=h1) Report
> :exclamation: No coverage uploaded for pull request base (`master@3f7a385`). [Click here to learn what that means](https://docs.codecov.io/docs/error-reference#section-missing-base-commit).
> The diff coverage is `100%`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/21739/graphs/tree.svg?width=650&height=150&token=eZ4WkYLtcO&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/21739?src=pr&el=tree)

```diff
@@            Coverage Diff            @@
##             master   #21739   +/-   ##
=========================================
  Coverage          ?   91.93%           
=========================================
  Files             ?      159           
  Lines             ?    49719           
  Branches          ?        0           
=========================================
  Hits              ?    45707           
  Misses            ?     4012           
  Partials          ?        0
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.3% <100%> (?)` | |
| #single | `42.02% <100%> (?)` | |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/21739?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/21739/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `85.33% <100%> (ø)` | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/21739?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/21739?src=pr&el=footer). Last update [3f7a385...30eb1fb](https://codecov.io/gh/pandas-dev/pandas/pull/21739?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

@jreback : Everything is green.  PTAL.
thanks @gfyoung nice cleanups! keep em coming!