From dde39c3d1aa323072de5703b8c30eabe07b3960c Mon Sep 17 00:00:00 2001 From: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com> Date: Thu, 14 May 2020 12:09:36 +0530 Subject: [PATCH] chore: Drop Python2 support (#21704) * chore: Drop Python2 support * test: Fix test redundancy by removing countries 3 countries seems ennough to test coa template feature --- .travis.yml | 17 ++--------------- erpnext/setup/doctype/company/test_company.py | 4 +--- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/.travis.yml b/.travis.yml index 213445b806..77d427e5a5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ -dist: trusty - language: python +dist: trusty git: depth: 1 @@ -14,21 +13,10 @@ addons: jobs: include: - - name: "Python 2.7 Server Side Test" - python: 2.7 - script: bench --site test_site run-tests --app erpnext --coverage - - name: "Python 3.6 Server Side Test" python: 3.6 script: bench --site test_site run-tests --app erpnext --coverage - - name: "Python 2.7 Patch Test" - python: 2.7 - before_script: - - wget http://build.erpnext.com/20171108_190013_955977f8_database.sql.gz - - bench --site test_site --force restore ~/frappe-bench/20171108_190013_955977f8_database.sql.gz - script: bench --site test_site migrate - - name: "Python 3.6 Patch Test" python: 3.6 before_script: @@ -40,8 +28,7 @@ install: - cd ~ - nvm install 10 - - git clone https://github.com/frappe/bench --depth 1 - - pip install -e ./bench + - pip install frappe-bench - git clone https://github.com/frappe/frappe --branch $TRAVIS_BRANCH --depth 1 - bench init --skip-assets --frappe-path ~/frappe --python $(which python) frappe-bench diff --git a/erpnext/setup/doctype/company/test_company.py b/erpnext/setup/doctype/company/test_company.py index b37cc17ba9..29f6c3731d 100644 --- a/erpnext/setup/doctype/company/test_company.py +++ b/erpnext/setup/doctype/company/test_company.py @@ -47,9 +47,7 @@ class TestCompany(unittest.TestCase): frappe.delete_doc("Company", "COA from Existing Company") def test_coa_based_on_country_template(self): - countries = ["India", "Brazil", "United Arab Emirates", "Canada", "Germany", "France", - "Guatemala", "Indonesia", "Italy", "Mexico", "Nicaragua", "Netherlands", "Singapore", - "Brazil", "Argentina", "Hungary", "Taiwan"] + countries = ["Canada", "Germany", "France"] for country in countries: templates = get_charts_for_country(country)