Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: remove unnecessary creation of companies #28965

Merged
merged 4 commits into from
Dec 20, 2021

Conversation

ankush
Copy link
Member

@ankush ankush commented Dec 20, 2021

Tests end up creating 19-20 companies... some for really bad uses 🤦

For instance in one test, to check abbreviations are correctly concatenated a whole new company is getting created 🥲

  • removed "New from Existing Company For Test"
  • changed the country for others to ones with no fixtures.
  • remove new country creation for shipment test.

Results: this test run is actually slower (LOL) due to randomness. But you can kinda expect 30-40 seconds saving per run.

@codecov
Copy link

codecov bot commented Dec 20, 2021

Codecov Report

Merging #28965 (e31ed37) into develop (66a10c0) will decrease coverage by 0.00%.
The diff coverage is 50.00%.

@@             Coverage Diff             @@
##           develop   #28965      +/-   ##
===========================================
- Coverage    55.59%   55.58%   -0.01%     
===========================================
  Files         1128     1128              
  Lines        67285    67287       +2     
===========================================
- Hits         37404    37400       -4     
- Misses       29881    29887       +6     
Impacted Files Coverage Δ
erpnext/__init__.py 69.87% <50.00%> (ø)
...work_order_stock_report/work_order_stock_report.py 50.00% <0.00%> (-44.12%) ⬇️
...wise_balance_history/batch_wise_balance_history.py 68.96% <0.00%> (-24.14%) ⬇️
.../manufacturing/report/bom_explorer/bom_explorer.py 94.44% <0.00%> (-5.56%) ⬇️
...eport/item_variant_details/item_variant_details.py 84.33% <0.00%> (-3.62%) ⬇️
.../report/stock_projected_qty/stock_projected_qty.py 86.84% <0.00%> (-2.64%) ⬇️
...ctype/accounting_dimension/accounting_dimension.py 64.06% <0.00%> (-1.57%) ⬇️
.../hr/doctype/upload_attendance/upload_attendance.py 44.69% <0.00%> (-1.52%) ⬇️
...e/period_closing_voucher/period_closing_voucher.py 88.23% <0.00%> (-1.48%) ⬇️
erpnext/portal/utils.py 28.98% <0.00%> (-1.45%) ⬇️
... and 20 more

@ankush ankush added backport version-13-hotfix squash Meant to tell reviewers that this PR should be squashed into a single commit while merging. labels Dec 20, 2021
@ankush ankush marked this pull request as ready for review December 20, 2021 16:24
@ankush ankush merged commit d7148ad into frappe:develop Dec 20, 2021
@ankush ankush deleted the companies_begone branch December 20, 2021 16:30
mergify bot pushed a commit that referenced this pull request Dec 20, 2021
test: remove unnecessary creation of companies
(cherry picked from commit d7148ad)
ankush added a commit that referenced this pull request Dec 20, 2021
test: remove unnecessary creation of companies
(cherry picked from commit d7148ad)

Co-authored-by: Ankush Menat <ankush@frappe.io>
conncampbell pushed a commit to conncampbell/erpnext that referenced this pull request Jan 9, 2022
test: remove unnecessary creation of companies
conncampbell pushed a commit to conncampbell/erpnext that referenced this pull request Jan 9, 2022
test: remove unnecessary creation of companies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport version-13-hotfix squash Meant to tell reviewers that this PR should be squashed into a single commit while merging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant