Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reactivate skipped unit tests #137

Open
jayaddison opened this issue Jan 14, 2023 · 5 comments
Open

Reactivate skipped unit tests #137

jayaddison opened this issue Jan 14, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@jayaddison
Copy link
Contributor

Steps to Reproduce

A few of the unit tests in the codebase have been marked as skipped temporarily.

Expected Behavior

Most, or ideally all, tests that are currently skipped should run again.

Current Behavior

Some of the unit tests are skipped.

Possible Solution

Various changes may be required to fix this (one discovered issue so far is that backup_database method is called with a None value for filename from some of the tests, resulting in a failure when filename.with_name is accessed -- perhaps constructing a database-object-without-backups-enabled object within the unit tests could help address that).

Environment

  • Operating System: Linux, Python3.10
  • Version or commit id: 928b696
  • Installed as Flatpak or Python package?: N/A (run directly using pytest within a Python virtualenv)
@cydanil
Copy link
Contributor

cydanil commented Jan 14, 2023

Yeah, the CI is... in a sorry state. So is the creation of appimages, both of which have been blocking new releases.

The CI is super important, but I would prioritize the creation of appimage first, as then the manual release tests can be done, and a release comparable to the previous could be done.

In the meantime, I welcome even the smallest fixes to the tests, though!

@jayaddison
Copy link
Contributor Author

Is there a plan for refactoring-out the db.new_db flag?

@cydanil
Copy link
Contributor

cydanil commented Jan 14, 2023

Not currently, but it can be safely removed.

This flag was key to creating a new database on a new Gourmet installation.
In Gourmand, a database with a couple of recipes is now provided by default.
The flag is now never set to True and can safely be removed, along with the code for creating the database (although it should probably be isolated in its own script, should we want to create a skeleton later on).

@jayaddison
Copy link
Contributor Author

one discovered issue so far is that backup_database method is called with a None value for filename from some of the tests, resulting in a failure when filename.with_name is accessed

...and today I discovered that @MrShark has already discovered and worked on that:

https://github.com/MrShark/gourmand/compare/fix_tests...MrShark:gourmand:testing

@MrShark do you have any plans to continue those fixes? If not, I'd like to pick up from those commits, if that's ok with you.

@MrShark
Copy link
Contributor

MrShark commented Mar 9, 2023

@jayaddison You are welcome to pick them up, I got squrelled away :-)

The most important patch is the two first I think: https://github.com/MrShark/gourmand/commit/b6b8d18854585bdc50cb3338f49bfeab67cf49af and b5a5af4
As Cydanil points out you'll have to look into the removed show_message() call and reintroduce it some ware else.

The third patch is mostly me trying out pytest and I'm not sure of its value

@FriedrichFroebel FriedrichFroebel added the enhancement New feature or request label Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants