Running coverage package over briefcase dev --test #1266
-
Hi Everyone, I'm wondering if its possible to run the coverage package over the briefcase dev --test command. So far the closest I've managed to come is the following setup: .coveragerc
<root_project_folder>\run_tests_with_coverage.py
Console Error
I will admit that importing modules, packages, etc is my absolute weakness, and the reason why I moved my project from a Kivy and buildozer to Beeware 😆 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
So - yes it's possible, but it's not trivial, especially if you potentially want to deploy to iOS or Android. There's an example of a working configuration in Toga's testbed app; That testbed has a bunch of additional complication because it needs to do some weird async and threading, but . Essentially you can't use |
Beta Was this translation helpful? Give feedback.
So - yes it's possible, but it's not trivial, especially if you potentially want to deploy to iOS or Android.
There's an example of a working configuration in Toga's testbed app; That testbed has a bunch of additional complication because it needs to do some weird async and threading, but .
Essentially you can't use
pyproject.toml
(or.coveragerc
, or any other file) as the source of your coverage configuration, because that file won't be in your packaged app (or on your path whenbriefcase dev
executes); you need to use the Coverage API to configure a coverage session and generate a report. The mapping from configuration file to API is relatively straightforward, so it shouldn't be too ha…