Cog-Creators / Cog-Creators/Red-DiscordBot
[RFC] Add more tests for Config to properly verify it behaves the same on all drivers
Open
Category: Core - API - Config
Status: Accepted
Status: PRs Welcome
Type: Bug
Type: Enhancement
- Dominant language
- Python
- Stars
- 5.7k
- Forks
- 2.5k
- Avg merge
- 6d 16h
- Merged PRs (30d)
- 1
Description
Stuff that I know are missing:
- [ ] `Group.clear_raw()`/ `Value.clear()` on partial primary keys
- [ ] `.set("non-dict")` on group with partial primary keys should fail (this isn't handled consistently by different drivers - JSON thinks it's okay, Postgres errors but the error is raised by asyncpg, driver doesn't handle anything), e.g.:
```py
config.init_custom("TEST", 3)
# both of statements below should raise some common error
await config.custom("TEST", "1", "2").set("non-dict")
await config.custom("TEST", "1").set({"2": "non-dict"})
```
Contributor guide
Assessment
This issue has not been assessed yet.