Changeset d5b48e6 in trunk
- Timestamp:
- 2021-08-27T14:14:39Z (4 years ago)
- Branches:
- master
- Children:
- 4c750cf
- Parents:
- bb48974f
- Location:
- src/allmydata
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/allmydata/test/test_util.py ¶
rbb48974f rd5b48e6 559 559 ) 560 560 561 def test_dumps_bytes_unicode_separators(self): 562 """Unicode separators don't prevent the result from being bytes.""" 563 result = jsonbytes.dumps_bytes([1, 2], separators=(u',', u':')) 564 self.assertIsInstance(result, bytes) 565 self.assertEqual(result, b"[1,2]") 566 561 567 562 568 class FakeGetVersion(object): -
TabularUnified src/allmydata/util/jsonbytes.py ¶
rbb48974f rd5b48e6 110 110 """ 111 111 result = dumps(obj, *args, **kwargs) 112 if PY3 :112 if PY3 or isinstance(result, str): 113 113 result = result.encode("utf-8") 114 114 return result
Note: See TracChangeset
for help on using the changeset viewer.