Skip to content

fix most skipped tests & increase coverage#91

Merged
indiVar0508 merged 9 commits intomasterfrom
indi-due3
Oct 13, 2023
Merged

fix most skipped tests & increase coverage#91
indiVar0508 merged 9 commits intomasterfrom
indi-due3

Conversation

@indiVar0508
Copy link
Copy Markdown
Contributor

No description provided.

@indiVar0508 indiVar0508 force-pushed the indi-due3 branch 3 times, most recently from 3158cb4 to b545515 Compare August 13, 2023 07:39
@coveralls
Copy link
Copy Markdown

coveralls commented Aug 13, 2023

Pull Request Test Coverage Report for Build 6506267089

  • 184 of 186 (98.92%) changed or added relevant lines in 24 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+1.8%) to 97.754%

Changes Missing Coverage Covered Lines Changed/Added Lines %
sqlalchemy_history/manager.py 11 13 84.62%
Totals Coverage Status
Change from base Build 6312458578: 1.8%
Covered Lines: 4941
Relevant Lines: 4988

💛 - Coveralls

@indiVar0508 indiVar0508 force-pushed the indi-due3 branch 5 times, most recently from dbefed2 to 56b17e7 Compare August 13, 2023 15:11
@indiVar0508 indiVar0508 changed the title fix most skipped tests fix most skipped tests & increase coverage Aug 13, 2023
@indiVar0508 indiVar0508 enabled auto-merge (rebase) August 20, 2023 12:55
@indiVar0508 indiVar0508 removed the request for review from AbdealiLoKo August 20, 2023 19:46
@indiVar0508 indiVar0508 force-pushed the indi-due3 branch 6 times, most recently from b737583 to cd377e4 Compare August 26, 2023 10:46
@indiVar0508 indiVar0508 force-pushed the indi-due3 branch 5 times, most recently from 049fc9e to cb853fc Compare September 22, 2023 16:07
pip install mkdocs-autorefs==0.4.1
pip install mkdocs-awesome-pages-plugin==2.8.0
pip install mkdocstrings==0.19.0
pip install mkdocstrings['python']==0.19.0
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo in commit message
"docuemntation" -> "documentation"

article = self.Article()
blogpost = self.BlogPost()
textitem = self.TextItem()
@mark.skipif("True", reason="concrete property is not supported yet")
Copy link
Copy Markdown

@aditya051293 aditya051293 Sep 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removing the reason?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kept the tests but excluded the this test as for now we do not support concrete props

return manager.version_class_map[model]
except KeyError:
return model
return manager.version_class_map.get(model, None)

This comment was marked as resolved.

assert article.versions[0] in reference1.versions[0].cited_by

def test_multiple_inserts_over_multiple_transactions(self):
if self.driver == "mysql" and self.connection.dialect.server_version_info < (5, 6):
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add it in commit message the reason for removing it.

assert article2.versions[1].operation_type == 1
assert article2.versions[0].operation_type == Operation.INSERT
assert article2.versions[1].operation_type == Operation.UPDATE
assert article2.versions[1].operation_type != Operation.INSERT
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove assert, looks redundant

there were few tests that were being skipped due to following
reasons:
1. schema not being created for oracle so added seperate query
   in exception block to create these schema
2. update column_reflection test to validate column availability
   in versioned class
3. removed deprecated tests which are only supported sqla<1.4
4. added reasons for some where we are not yet able to address
   issue
5. added pragma no cover for except block in tests as
   we ocasionally hit that in local test but won't happen in CI
6. Removed a check for skipping mysql < 5.6 in a test since we
   don't test with it and it is EoL anyways.
small move to start using fixtures from pytest as teardown was
not working unittest and sometimes a test would fail all subsequent
tests started failing, this is due to create_models which once get
created are not removed.
splitted fixtures to more atomic fixtures for better structure.
added `setup_session` as a dependency fixture for all subclass
fixtures
tried to boost coverage for certain tests by doing one of following

1. remove dead code supporting <1.4
2. update configurations to hit certain lines
3. stop skipping tests for mysql < 5.6 as we don't support it
4. added few test

these are minor changes which were straight forward to do there are
more such scenerio which might take time
@indiVar0508 indiVar0508 merged commit 568cfb5 into master Oct 13, 2023
@indiVar0508 indiVar0508 deleted the indi-due3 branch October 13, 2023 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor all tests to run on pytest?

3 participants