question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

platform specific configuration

See original GitHub issue

Originally reported by John Vandenberg (Bitbucket: jayvdb, GitHub: jayvdb)


If a block has two platform/OS-specific branches, currently the only way to reach 100% with a single configuration is to use #pragma: no cover on both branches, ignoring the block when coverage is run on any platform/OS.

It is useful for each platform/OS to require coverage for their own branch.

This can be currently be achieved by using a different configuration file for each platformOS.

It would be helpful that the configuration allows for different ignore patterns for platform/OS, so only one configuration file is needed for all platforms.

One easy way to do this is to iterate the section names in the ini file, extracting any section with pytest in the name, and then finding the most appropriate section for the host platform/OS.

Another approach is to allow the ignore regex to be specified on the command line.


Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:24 (24 by maintainers)

github_iconTop GitHub Comments

1reaction
nedbatcommented, Feb 25, 2020

There’s a new coverage plugin that can do these sorts of conditionals: https://sobolevn.me/2020/02/conditional-coverage

0reactions
nedbatcommented, Jun 23, 2018

You can already get the effect of the regex being specified on the command line, because environment variables are expanded in the .coveragerc values. So you could use TOXENV in your coverage pragma, or some other environment variable you create just for that purpose.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Platform-Specifics - Xamarin - Microsoft Learn
Platform -specifics allow you to consume functionality that's only available on a specific platform, without implementing custom renderers or ...
Read more >
Platform Specific Settings - Arista AVD collection
Platform Specific Settings ¶. Set platform specific settings, TCAM profile and reload delay. The reload delay values should be reviewed and ...
Read more >
V2: new tox multi-dimensional, platform-specific configuration
This document discusses a possible solution for each of these issues, namely these goals: allow to more easily define and run dependency/interpreter variants ......
Read more >
Platform specific settings - Unity Forum
I currently make builds for WebGL uncompressed in my build script, then compress them manually using gzip. Now we're expanding our project to ......
Read more >
Platform-specific settings #55820 - microsoft/vscode - GitHub
menuBarVisibility.windows", and exists on all platforms(windows, linux, osx). ... menuBarVisibility.windows" Platform-specific settings on Sep 13, 2018.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found