Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Failing to execute pytest or other binary commands with gflags #43

Open
girishsv1986 opened this issue Feb 1, 2019 · 3 comments
Open

Comments

@girishsv1986
Copy link

Hi there,

I'm using gflags for accepting command line arguments in one of the script recently added in application. There are unit testcases in the application that I execute using pytest library. Unit test execution was working fine till the time GFLAGS library was not sys path. After adding gflags, the command line arguments provided to pytest or py.test or any other command in interpreted/interrupted by the GFlags and it ultimately throw back the following error.

python_gflags-2.0-py2.6.egg/gflags.py:1319: in call
raise UnrecognizedFlagError(opt, value)
E UnrecognizedFlagError: Unknown command line flag 'cov-config'

---------- coverage: platform linux2, python 2.7.5-final-0 -----------

Command I'm executing is mentioned below. Is there any way to disable/force gflags to ignore such commands?
py.test --cov-config .coveragerc --cov-report html --cov=.

@jhagege
Copy link

jhagege commented Mar 13, 2019

Did you find a solution ?

@girishsv1986
Copy link
Author

No, didn't got any solution, yet to look into library code and how it can be skipped or ignored

@jhagege
Copy link

jhagege commented Mar 16, 2019

Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants