Mohammad Hasnain Mohsin Rajan
ae5cf9c32c
chore: change `missing_in_backup` function docstring
3 years ago
Ankush Menat
c663ab7d44
test: improve test failure message
3 years ago
Faris Ansari
47a21fb9a7
test: db.commit to release lock
4 years ago
Faris Ansari
fbd900aaff
test: for set-password and set-admin-password
4 years ago
Gavin D'souza
01d275f667
style: Format code for better readability
* Remove trailing whitespaces
* Format code to fit module conventions
* Add appropriate new lines between imports, classes, fn defs, etc
* Added comments, docstrings & module headers
4 years ago
barredterra
fc2c887635
test: fix return code
4 years ago
barredterra
d7e0479ee7
test: add test for `bench version`
4 years ago
Ankush Menat
4754ab71d1
perf(minor): remove unnecessary comprehensions
- remove several unnecessary comprehensions from functions that accept a generator.
- Using `[x for x in iter]` causes a list to be built first then passed to the outer function.
- `any` and `all` can take generator instead. This makes memory usage O(1) and actually makes these functions short-circuiting. E.g. if the first condition fails then `all` will immediately return false instead of evaluating all the entries.
- `sum`, `min`, `max` => memory usage become O(1)
- `list`, `set`, `.join()` => roughly halves memory usage, as list is not required to be built.
- lastly, it's two fewer characters to read/think about.
4 years ago
Gavin D'souza
983e29d666
chore(cli): Add pending deprecation warning
* Add PDW for --as-dict in command set-config
* Move all top level imports inside each util to optimize imports for
CLI
* Set always show filter for DeprecationWarning, PendingDeprecationWarning via frappe module
(cherry picked from commit bf9fcb3
)
---
Conflicts Resolved. 1 Pending
Depends on https://github.com/frappe/frappe/pull/13125
4 years ago
Ankush Menat
a077466b1e
chore: replace assertEquals with alias assertEqual
`assertEquals` has been deprecated, while not fully removed it will
still keep giving warnings in tests / CI.
ref: https://docs.python.org/3/library/unittest.html#deprecated-aliases
4 years ago
Gavin D'souza
b30980ebf5
test: Add tests for bench show-config
(cherry picked from commit 3b34474f8d
)
# Conflicts:
# frappe/tests/test_commands.py
4 years ago
Gavin D'souza
77dfa33aac
test: Added tests for bench list-apps -f json
(cherry picked from commit 520143d43a
)
4 years ago
Gavin D'souza
bf9fcb3ff6
chore(cli): Add pending deprecation warning
* Add PDW for --as-dict in command set-config
* Move all top level imports inside each util to optimize imports for
CLI
* Set always show filter for DeprecationWarning, PendingDeprecationWarning via frappe module
4 years ago
Gavin D'souza
3b34474f8d
test: Add tests for bench show-config
4 years ago
Gavin D'souza
520143d43a
test: Added tests for bench list-apps -f json
4 years ago
Faris Ansari
b181b69894
feat: Set default site using FRAPPE_SITE env var
Default site can now be set using the environment variable FRAPPE_SITE
An attempt to deprecate the use of currentsite.txt
4 years ago
Faris Ansari
9e954a7372
style: quotes
4 years ago
Faris Ansari
5a60048a0a
test: for get_bench_relative_path
4 years ago
Gavin D'souza
f1cd3388ba
style: Black-ish + fixed typos + Optimized imports
4 years ago
Gavin D'souza
2911799046
fix: Re-write restore tests to process another site
4 years ago
Gavin D'souza
84e2fcd6a8
fix: Add missing quote
4 years ago
Gavin D'souza
22b752ac21
test: Add tests for bench restore
4 years ago
Gavin D'souza
a22cd461ac
test: Commit after insert, not before count check
4 years ago
Gavin D'souza
34af8cb326
fix: Show partial backups when flag set
* in fetch_latest_backups whitelisted API
* BackupGenerator.get_recent_backup
4 years ago
Gavin D'souza
3fed5c7255
test: Add tests for bench partial-restore
4 years ago
Gavin D'souza
7394427df0
test: Add tests for bench list-apps
4 years ago
Gavin D'souza
7d19294a29
chore: Resolve conflicts
4 years ago
Gavin D'souza
e140564136
test: Added tests for bench remove-from-installed-apps
(cherry picked from commit cb44492feb
)
# Conflicts:
# frappe/tests/test_commands.py
4 years ago
Gavin D'souza
cb44492feb
test: Added tests for bench remove-from-installed-apps
4 years ago
Aditya Hase
9d0ca3b72e
test(recorder): Test start-recording and stop-recording commands
4 years ago
Gavin D'souza
368a031da3
fix: Update postgres exlcude table data
4 years ago
Gavin D'souza
44a09191b3
fix: Use public schema for postgres site
tx @surajshetty3416
4 years ago
Gavin D'souza
104186906f
feat: Show command execution summary in message format
4 years ago
Gavin D'souza
26387401b3
test: Added tests for bench backup skip tables
* Added utils for coloured outputs
* Fixed bug during last branch update
4 years ago
Gavin D'souza
89c2973ea8
test: Fix tests to map with functionality
4 years ago
Gavin D'souza
60e76e0606
fix: Enhancements for the BaseCommands class
4 years ago
Gavin D'souza
6ea47833ec
test: Added tests for backup command
4 years ago
Gavin D'souza
5f299b191d
chore: Added comments and style
4 years ago
Gavin D'souza
99496d97f3
test: Add tests for bench execute
4 years ago
Gavin D'souza
7c2510eb6a
feat: Mini Test Suite for commands
4 years ago