From 867c799609650f30ef45734f5f686043d93ab429 Mon Sep 17 00:00:00 2001 From: Kevin Morris Date: Tue, 1 Jun 2021 11:43:39 +0000 Subject: [PATCH] Update Python Port --- Python-Port.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Python-Port.md b/Python-Port.md index 68de61f..b1ebb5f 100644 --- a/Python-Port.md +++ b/Python-Port.md @@ -115,6 +115,14 @@ and spacing. `autopep8` can be used to automatically format your code 5. SQLAlchemy ORM model attributes should be Capitalized if they are literal table columns or *forward references*, otherwise snake_cased for *backref references*. 6. Use typed arguments as often as possible. We'd like to show users the types of arguments without relying on documentation, and this helps a ton with that. +A few small clues about some of our local `aurweb` package utilities that should be used in tests: +- Always use aurweb.db.(create|delete|query) for database + operations, where possible. +- Always define mutable globals in the style: `var1 = var2 = None`. +- `yield` the most dependent model in pytest setup fixture **iff** + you must delete records after test runs to maintain database + integrity. Example: test/test_account_type.py. + ## Who, Where?