diff options
author | Daniel Bengtsson <dbengt@redhat.com> | 2021-03-04 12:32:55 +0100 |
---|---|---|
committer | Daniel Bengtsson <dbengt@redhat.com> | 2021-03-09 15:02:29 +0100 |
commit | e6d6b90bf440ac0631f659d75b1c54a206d71af3 (patch) | |
tree | 07bc26024d0d93df3952068e009b43da219970d9 | |
parent | 9aa6114d746af5f74741d589f9c21280c446a83a (diff) | |
download | oslo-db-e6d6b90bf440ac0631f659d75b1c54a206d71af3.tar.gz |
Fix the conflict status with hacking.
The conflict is caused by:
The user requested flake8 3.8.3 (from /home/zuul/.cache/pre-commit/repozi7hytk7)
hacking 3.0.1 depends on flake8<3.8.0 and >=3.6.0
Install the latest version of hacking to fix the conflict error with the
pre-commit hook.
Change-Id: If1c54502e6e10751fd722694aa5429a08f376798
-rw-r--r-- | .pre-commit-config.yaml | 2 | ||||
-rw-r--r-- | oslo_db/tests/sqlalchemy/test_exc_filters.py | 16 | ||||
-rw-r--r-- | oslo_db/tests/sqlalchemy/test_fixtures.py | 8 |
3 files changed, 7 insertions, 19 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9d94556..a8c2b27 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -32,4 +32,4 @@ repos: hooks: - id: flake8 additional_dependencies: - - hacking>=3.0.1,<3.1.0 + - hacking==4.0.0 diff --git a/oslo_db/tests/sqlalchemy/test_exc_filters.py b/oslo_db/tests/sqlalchemy/test_exc_filters.py index 0451c89..b7e0f91 100644 --- a/oslo_db/tests/sqlalchemy/test_exc_filters.py +++ b/oslo_db/tests/sqlalchemy/test_exc_filters.py @@ -663,19 +663,11 @@ class TestExceptionCauseMySQLSavepoint(test_base._MySQLOpportunisticTestCase): # session even though the SAVEPOINT was lost; # the net result here is that one exception is thrown # instead of two. This is SQLAlchemy ticket #3680 - self.assertTrue( - isinstance( - dbe_inner.cause, - exception.DBDuplicateEntry - ) - ) + self.assertIsInstance( + dbe_inner.cause, exception.DBDuplicateEntry) + except exception.DBError as dbe_outer: - self.assertTrue( - isinstance( - dbe_outer.cause, - exception.DBDuplicateEntry - ) - ) + self.AssertIsInstance(dbe_outer.cause, exception.DBDuplicateEntry) # resets itself afterwards try: diff --git a/oslo_db/tests/sqlalchemy/test_fixtures.py b/oslo_db/tests/sqlalchemy/test_fixtures.py index 6b9fb20..97f8d64 100644 --- a/oslo_db/tests/sqlalchemy/test_fixtures.py +++ b/oslo_db/tests/sqlalchemy/test_fixtures.py @@ -250,9 +250,7 @@ class TestLoadHook(unittest.TestCase): found_tests = loader.discover(start_dir, pattern="test_fixtures.py") new_loader = load_tests(loader, found_tests, "test_fixtures.py") - self.assertTrue( - isinstance(new_loader, testresources.OptimisingTestSuite) - ) + self.assertIsInstance(new_loader, testresources.OptimisingTestSuite) actual_tests = unittest.TestSuite( testscenarios.generate_scenarios(found_tests) @@ -274,9 +272,7 @@ class TestLoadHook(unittest.TestCase): new_loader = load_tests( loader, unittest.suite.TestSuite(), "test_fixtures.py") - self.assertTrue( - isinstance(new_loader, testresources.OptimisingTestSuite) - ) + self.assertIsInstance(new_loader, testresources.OptimisingTestSuite) actual_tests = unittest.TestSuite( testscenarios.generate_scenarios( |