HPI/tests
Sean Breckenridge 46198a6447
my.core.serialize: simplejson support, more types (#176)
* my.core.serialize: simplejson support, more types

I added a couple extra checks to the default function,
serializing datetime, dates and dataclasses (incase
orjson isn't installed)

(copied from below)

if orjson couldn't be imported, try simplejson
This is included for compatibility reasons because orjson
is rust-based and compiling on rarer architectures may not work
out of the box

as an example, I've been having issues getting it to install
on my phone (termux/android)

unlike the builtin JSON modue which serializes NamedTuples as lists
(even if you provide a default function), simplejson correctly
serializes namedtuples to dictionaries

this just gives another option to people, simplejson is pure python
so no one should have issues with that. orjson is still way faster,
so still preferable if its easy and theres a precompiled build
for your architecture (which there typically is)

If you're ever running this with simplejson installed and not orjson,
its pretty easy to tell as the JSON styling is different; orjson has
no spaces between tokens, simplejson puts spaces between tokens. e.g.

simplejson: {"a": 5, "b": 10}
orjson: {"a":5,"b":10}
2021-07-08 23:02:56 +01:00
..
core core/structure: help locate/extract gdpr exports (#175) 2021-07-08 00:44:55 +01:00
extra polar: move to top level, add page support 2021-05-29 13:26:01 +01:00
__init__.py Add tests for pdfs 2020-08-16 13:36:36 -07:00
bluemaestro.py my.pdfs: reorganize tests a bit, fix mypy 2021-04-01 17:27:06 +01:00
calendar.py my.calendar.holidays: unhardcode calendar, detect it from the location data 2020-10-09 23:22:00 +02:00
cli.py core: add more tests for stat/datetime guessing 2021-02-14 16:20:38 +00:00
commits.py my.coding.commits: actually test on CI, add config stub 2021-03-15 10:33:46 +00:00
common.py my.pdfs: reorganize tests a bit, fix mypy 2021-04-01 17:27:06 +01:00
config.py core: deprecate my.cfg, instead my.config can (and should be) used directly 2021-02-19 02:39:25 +00:00
conftest.py reflect cachew changes of exception handling and temporary suppression 2020-10-08 21:22:02 +02:00
core.py core: add hpi query command (#157) 2021-04-06 17:19:58 +01:00
demo.py fix spelling mistakes 2020-09-06 20:44:28 +01:00
emfit.py tests: run all tests, but exclude tests specific to my computer from CI 2021-02-14 17:47:18 +00:00
foursquare.py tests: run all tests, but exclude tests specific to my computer from CI 2021-02-14 17:47:18 +00:00
get_files.py core/windows: fix get_files and its tests 2021-02-16 06:40:42 +00:00
github.py tests: run all tests, but exclude tests specific to my computer from CI 2021-02-14 17:47:18 +00:00
goodreads.py my.goodreads: cleanup, rename from my.reading.goodrads & use proper pip dependency 2021-03-26 05:06:53 +00:00
hypothesis.py tests: run all tests, but exclude tests specific to my computer from CI 2021-02-14 17:47:18 +00:00
instapaper.py tests: run all tests, but exclude tests specific to my computer from CI 2021-02-14 17:47:18 +00:00
jawbone.py tests: run all tests, but exclude tests specific to my computer from CI 2021-02-14 17:47:18 +00:00
lastfm.py tests: run all tests, but exclude tests specific to my computer from CI 2021-02-14 17:47:18 +00:00
location.py my.pdfs: reorganize tests a bit, fix mypy 2021-04-01 17:27:06 +01:00
misc.py core/cachew: use cache_dir in mcachew if it wasn't specified by the user 2021-02-21 19:51:58 +00:00
orgmode.py tests: run all tests, but exclude tests specific to my computer from CI 2021-02-14 17:47:18 +00:00
pdfs.py my.pdfs: cleanup/refactor 2021-04-01 17:27:06 +01:00
reddit.py tests: run all tests, but exclude tests specific to my computer from CI 2021-02-14 17:47:18 +00:00
rtm.py tests: run all tests, but exclude tests specific to my computer from CI 2021-02-14 17:47:18 +00:00
serialize.py my.core.serialize: orjson with additional default and _serialize hook (#140) 2021-03-20 00:48:03 +00:00
serialize_simplejson.py my.core.serialize: simplejson support, more types (#176) 2021-07-08 23:02:56 +01:00
smscalls.py tests: run all tests, but exclude tests specific to my computer from CI 2021-02-14 17:47:18 +00:00
sqlite.py core/sqlite: move tests to separate module, pickling during Pool.submit can't handle importing :( 2021-04-05 08:37:07 +01:00
takeout.py core/time: more flexible support for resolving TZ abbreviation -> TZ ambiguities 2021-03-08 00:40:19 +00:00
tweets.py tests: run all tests, but exclude tests specific to my computer from CI 2021-02-14 17:47:18 +00:00
tz.py CI: better cleanup for modules in between tests 2021-02-19 02:39:25 +00:00
youtube.py tests: run all tests, but exclude tests specific to my computer from CI 2021-02-14 17:47:18 +00:00