(fname: str = "zoneinfo_data.json")
| 100 | |
| 101 | |
| 102 | def update_test_data(fname: str = "zoneinfo_data.json") -> None: |
| 103 | TEST_DATA_LOC.mkdir(exist_ok=True, parents=True) |
| 104 | |
| 105 | # Annotation required: https://github.com/python/mypy/issues/8772 |
| 106 | json_kwargs: typing.Dict[str, typing.Any] = dict( |
| 107 | indent=2, sort_keys=True, |
| 108 | ) |
| 109 | |
| 110 | compressed_keys = load_compressed_keys() |
| 111 | metadata = get_zoneinfo_metadata() |
| 112 | output = { |
| 113 | "metadata": metadata, |
| 114 | "data": compressed_keys, |
| 115 | } |
| 116 | |
| 117 | with open(TEST_DATA_LOC / fname, "w") as f: |
| 118 | json.dump(output, f, **json_kwargs) |
| 119 | |
| 120 | |
| 121 | if __name__ == "__main__": |
no test coverage detected
searching dependent graphs…