chore: Fix deprecated unittest aliases for Python 3.11 compatibility. (#17562)
* chore: Fix deprecated unittest aliases for Python 3.11 compatibility. * chore: Cache pip dependencies. * chore: Cache more pip dependencies.
This commit is contained in:
parent
ebb34196f2
commit
11cf15f8dc
|
|
@ -51,6 +51,8 @@ jobs:
|
|||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
cache: 'pip'
|
||||
cache-dependency-path: 'requirements/testing.txt'
|
||||
- name: Install dependencies
|
||||
if: steps.check.outcome == 'failure'
|
||||
uses: ./.github/actions/cached-dependencies
|
||||
|
|
@ -58,6 +60,7 @@ jobs:
|
|||
run: |
|
||||
apt-get-install
|
||||
pip-upgrade
|
||||
pip install wheel
|
||||
pip install -r requirements/testing.txt
|
||||
setup-mysql
|
||||
- name: Run celery
|
||||
|
|
@ -115,6 +118,8 @@ jobs:
|
|||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
cache: 'pip'
|
||||
cache-dependency-path: 'requirements/testing.txt'
|
||||
- name: Install dependencies
|
||||
if: steps.check.outcome == 'failure'
|
||||
uses: ./.github/actions/cached-dependencies
|
||||
|
|
@ -122,6 +127,7 @@ jobs:
|
|||
run: |
|
||||
apt-get-install
|
||||
pip-upgrade
|
||||
pip install wheel
|
||||
pip install -r requirements/testing.txt
|
||||
setup-postgres
|
||||
- name: Run celery
|
||||
|
|
@ -171,6 +177,8 @@ jobs:
|
|||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
cache: 'pip'
|
||||
cache-dependency-path: 'requirements/testing.txt'
|
||||
- name: Install dependencies
|
||||
if: steps.check.outcome == 'failure'
|
||||
uses: ./.github/actions/cached-dependencies
|
||||
|
|
@ -178,6 +186,7 @@ jobs:
|
|||
run: |
|
||||
apt-get-install
|
||||
pip-upgrade
|
||||
pip install wheel
|
||||
pip install -r requirements/testing.txt
|
||||
mkdir ${{ github.workspace }}/.temp
|
||||
- name: Run celery
|
||||
|
|
|
|||
|
|
@ -33,6 +33,8 @@ jobs:
|
|||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
cache: 'pip'
|
||||
cache-dependency-path: 'requirements/testing.txt'
|
||||
- name: Install dependencies
|
||||
if: steps.check.outcome == 'failure'
|
||||
uses: ./.github/actions/cached-dependencies
|
||||
|
|
@ -40,6 +42,7 @@ jobs:
|
|||
run: |
|
||||
apt-get-install
|
||||
pip-upgrade
|
||||
pip install wheel
|
||||
pip install -r requirements/testing.txt
|
||||
- name: pylint
|
||||
if: steps.check.outcome == 'failure'
|
||||
|
|
@ -62,12 +65,15 @@ jobs:
|
|||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
cache: 'pip'
|
||||
cache-dependency-path: 'requirements/integration.txt'
|
||||
- name: Install dependencies
|
||||
uses: ./.github/actions/cached-dependencies
|
||||
with:
|
||||
run: |
|
||||
apt-get-install
|
||||
pip-upgrade
|
||||
pip install wheel
|
||||
pip install -r requirements/integration.txt
|
||||
- name: pre-commit
|
||||
run: pre-commit run --all-files
|
||||
|
|
@ -88,12 +94,15 @@ jobs:
|
|||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
cache: 'pip'
|
||||
cache-dependency-path: 'requirements/base.txt'
|
||||
- name: Install dependencies
|
||||
uses: ./.github/actions/cached-dependencies
|
||||
with:
|
||||
run: |
|
||||
apt-get-install
|
||||
pip-upgrade
|
||||
pip install wheel
|
||||
pip install -r requirements/base.txt
|
||||
- name: Test babel extraction
|
||||
run: flask fab babel-extract --target superset/translations --output superset/translations/messages.pot --config superset/translations/babel.cfg -k _,__,t,tn,tct
|
||||
|
|
|
|||
|
|
@ -62,6 +62,8 @@ jobs:
|
|||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
cache: 'pip'
|
||||
cache-dependency-path: 'requirements/testing.txt'
|
||||
- name: Install dependencies
|
||||
if: steps.check.outcome == 'failure'
|
||||
uses: ./.github/actions/cached-dependencies
|
||||
|
|
@ -69,6 +71,7 @@ jobs:
|
|||
run: |
|
||||
apt-get-install
|
||||
pip-upgrade
|
||||
pip install wheel
|
||||
pip install -r requirements/testing.txt
|
||||
setup-postgres
|
||||
- name: Run celery
|
||||
|
|
@ -137,6 +140,8 @@ jobs:
|
|||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
cache: 'pip'
|
||||
cache-dependency-path: 'requirements/testing.txt'
|
||||
- name: Install dependencies
|
||||
if: steps.check.outcome == 'failure'
|
||||
uses: ./.github/actions/cached-dependencies
|
||||
|
|
@ -144,6 +149,7 @@ jobs:
|
|||
run: |
|
||||
apt-get-install
|
||||
pip-upgrade
|
||||
pip install wheel
|
||||
pip install -r requirements/testing.txt
|
||||
setup-postgres
|
||||
- name: Run celery
|
||||
|
|
|
|||
|
|
@ -35,6 +35,8 @@ jobs:
|
|||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
cache: 'pip'
|
||||
cache-dependency-path: 'requirements/testing.txt'
|
||||
# TODO: separated requiermentes.txt file just for unit tests
|
||||
- name: Install dependencies
|
||||
if: steps.check.outcome == 'failure'
|
||||
|
|
@ -43,6 +45,7 @@ jobs:
|
|||
run: |
|
||||
apt-get-install
|
||||
pip-upgrade
|
||||
pip install wheel
|
||||
pip install -r requirements/testing.txt
|
||||
mkdir ${{ github.workspace }}/.temp
|
||||
- name: Python unit tests
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ class TestBigQueryDbEngineSpec(TestDbEngineSpec):
|
|||
# Test check for missing schema.
|
||||
sys.modules["google.oauth2"] = mock.MagicMock()
|
||||
for invalid_kwarg in invalid_kwargs:
|
||||
self.assertRaisesRegexp(
|
||||
self.assertRaisesRegex(
|
||||
Exception,
|
||||
"The table schema must be defined",
|
||||
BigQueryEngineSpec.df_to_sql,
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ class TestMssqlEngineSpec(TestDbEngineSpec):
|
|||
column_spec = MssqlEngineSpec.get_column_spec(type_string)
|
||||
if column_spec != None:
|
||||
self.assertIsInstance(column_spec.sqla_type, type_expected)
|
||||
self.assertEquals(column_spec.generic_type, generic_type_expected)
|
||||
self.assertEqual(column_spec.generic_type, generic_type_expected)
|
||||
|
||||
assert_type("STRING", String, GenericDataType.STRING)
|
||||
assert_type("CHAR(10)", String, GenericDataType.STRING)
|
||||
|
|
|
|||
|
|
@ -467,13 +467,13 @@ class TestRolePermission(SupersetTestCase):
|
|||
table.table_name = "tmp_perm_table_v2"
|
||||
session.commit()
|
||||
# TODO(bogdan): modify slice permissions on the table update.
|
||||
self.assertNotEquals(slice.perm, table.perm)
|
||||
self.assertNotEqual(slice.perm, table.perm)
|
||||
self.assertEqual(slice.perm, f"[tmp_database].[tmp_perm_table](id:{table.id})")
|
||||
self.assertEqual(
|
||||
table.perm, f"[tmp_database].[tmp_perm_table_v2](id:{table.id})"
|
||||
)
|
||||
# TODO(bogdan): modify slice schema permissions on the table update.
|
||||
self.assertNotEquals(slice.schema_perm, table.schema_perm)
|
||||
self.assertNotEqual(slice.schema_perm, table.schema_perm)
|
||||
self.assertIsNone(slice.schema_perm)
|
||||
|
||||
# updating slice refreshes the permissions
|
||||
|
|
|
|||
Loading…
Reference in New Issue