Skip to content

Commit

Permalink
Issue 864 py39 (#865)
Browse files Browse the repository at this point in the history
* Update to 3.9

* Remove create_autospec because it is no longer needed and now creates AsyncMocks for some reasons

* Remove now-unnecessary changes

* contextmanager import no longer needed

* Update SQL parse based on security advisory
  • Loading branch information
thcrock authored Dec 7, 2021
1 parent f15b86a commit 829a1b7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
--health-retries 5
strategy:
matrix:
python-version: [3.6, 3.7]
python-version: [3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 2 additions & 2 deletions requirement/main.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ python-dateutil==2.8.1
boto3==1.14.45
click==7.1.2
inflection==0.5.0
numpy==1.19.0
numpy==1.21.1
sqlalchemy-postgres-copy==0.5.0
retrying==1.3.3
Dickens==1.0.1
signalled-timeout==1.0.0
s3fs==0.4.2
wrapt==1.12.1
argcmdr==0.7.0
sqlparse==0.3.1
sqlparse==0.4.2
pebble==4.5.3
adjustText==0.7.3
graphviz==0.14
Expand Down
12 changes: 6 additions & 6 deletions src/tests/catwalk_tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
matrix_metadata_creator,
)

from unittest.mock import patch, create_autospec, MagicMock
from unittest.mock import patch, MagicMock


def test_ModelTrainTester_generate_tasks(db_engine_with_results_schema, project_storage, sample_timechop_splits, sample_grid_config):
Expand Down Expand Up @@ -85,11 +85,11 @@ def setup_model_train_tester(project_storage, replace, additional_bigtrain_class
'test_store': test_matrix_store
}

predictor = MagicMock(spec_set=create_autospec(Predictor))
trainer = MagicMock(spec_set=create_autospec(ModelTrainer))
evaluator = MagicMock(spec_set=create_autospec(ModelEvaluator))
individual_importance_calculator = MagicMock(spec_set=create_autospec(IndividualImportanceCalculator))
protected_groups_generator = MagicMock(spec_set=create_autospec(ProtectedGroupsGenerator))
predictor = MagicMock(spec_set=Predictor)
trainer = MagicMock(spec_set=ModelTrainer)
evaluator = MagicMock(spec_set=ModelEvaluator)
individual_importance_calculator = MagicMock(spec_set=IndividualImportanceCalculator)
protected_groups_generator = MagicMock(spec_set=ProtectedGroupsGenerator)
train_tester = ModelTrainTester(
matrix_storage_engine=matrix_storage_engine,
model_trainer=trainer,
Expand Down

0 comments on commit 829a1b7

Please sign in to comment.