
GITHUB . COM {
}
Detected CMS Systems:
- Wordpress (2 occurrences)
Title:
Py.test improperly handles command line options with spaces Β· Issue #1471 Β· pytest-dev/pytest
Description:
A sample script: #conftest.py import pytest @pytest.hookimpl def pytest_addoption(parser): parser.addoption('--env', action='store', dest='env') #mytest.py def test_me(reque...
Website Age:
17 years and 8 months (reg. 2007-10-09).
Matching Content Categories {π}
- Technology & Computing
- Mobile Technology & AI
- Social Networks
Content Management System {π}
What CMS is github.com built with?
Github.com is based on WORDPRESS.
Traffic Estimate {π}
What is the average monthly size of github.com audience?
ππ Tremendous Traffic: 10M - 20M visitors per month
Based on our best estimate, this website will receive around 10,000,019 visitors per month in the current month.
However, some sources were not loaded, we suggest to reload the page to get complete results.
check SE Ranking
check Ahrefs
check Similarweb
check Ubersuggest
check Semrush
How Does Github.com Make Money? {πΈ}
Subscription Packages {π³}
We've located a dedicated page on github.com that might include details about subscription plans or recurring payments. We identified it based on the word pricing in one of its internal links. Below, you'll find additional estimates for its monthly recurring revenues.How Much Does Github.com Make? {π°}
Subscription Packages {π³}
Prices on github.com are in US Dollars ($).
They range from $4.00/month to $21.00/month.
We estimate that the site has approximately 4,989,889 paying customers.
The estimated monthly recurring revenue (MRR) is $20,957,532.
The estimated annual recurring revenues (ARR) are $251,490,385.
Wordpress Themes and Plugins {π¨}
What WordPress theme does this site use?
It is strange but we were not able to detect any theme on the page.
What WordPress plugins does this website use?
It is strange but we were not able to detect any plugins on the page.
Keywords {π}
pytest, update, options, cmdline, mytestpy, env, envxml, dir, sign, error, rootdir, pull, requests, projects, command, issue, sample, captureno, exists, file, nicoddemus, navigation, actions, security, improperly, handles, line, spaces, closed, conftestpy, def, pytestini, fileordir, userssvasilyevparent, junitxml, preparsing, detection, plugins, ronnypfannschmidt, commented, member, mentioned, github, labels, type, milestone, footer, skip, content, menu,
Topics {βοΈ}
/users/svasilyev/parent/pytest-cmdline-sample completed pyup-bot mentioned /users/svasilyev/parent hookimpl def pytest_addoption packages needed activity comment metadata assignees py def test_me personal information py sample scripts dir opt val notations fix determining rootdir sample command cmdline pre-parsing standalone cmdline option type projects projects milestone py & pytest $ touch pytest cmdline options parent dir sample script cmdline parsing opt=val test file test --capture= pre-parsed py usage 10 pytest-2 current dir outer dir local dir test --env action='store' unrecognized arguments target file rootdir detection properly loaded argparse accepts expected behaviour mac os assigned labels labels type milestone relationships ini $ py space-notation options github file exists xml --capture= dest='env'
Payment Methods {π}
- Braintree
Questions {β}
- Already have an account?
Schema {πΊοΈ}
DiscussionForumPosting:
context:https://schema.org
headline:Py.test improperly handles command line options with spaces
articleBody:A sample script:
```
#conftest.py
import pytest
@pytest.hookimpl
def pytest_addoption(parser):
parser.addoption('--env', action='store', dest='env')
```
```
#mytest.py
def test_me(request):
print(request.config.option.env)
```
A sample command that fails:
```
$ touch pytest.ini
$ py.test --env ../111/env.xml --capture=no mytest.py
usage: py.test [options] [file_or_dir] [file_or_dir] [...]
py.test: error: unrecognized arguments: --env mytest.py
inifile: None
rootdir: /Users/svasilyev/parent
```
Where `/Users/svasilyev/parent` is a parent dir for the sample scripts dir (they are in /Users/svasilyev/parent/pytest-cmdline-sample).
The error happens only when `../111/env.xml` actually exists, and it is outside of the current dir with `conftest.py` & `pytest.ini`.
The error does NOT happen when:
- ... the target file does not exists (even if it points to outer dir), or this is not a filename (just by accident, like "no" in `--capture no` notation).
- ... the file exists, but it is in the local dir or any subdir: `py.test --env ./env.xml --capture=no mytest.py`.
- ... cmdline options are in this order: `py.test --capture=no --env ../111/env.xml mytest.py` (surprise!)
- β¦ the same space-notation is used for built-in options (e.g., `--junit-xml ../111/junit.xml`)
I guess the error is caused by py.test's cmdline pre-parsing and rootdir detection: it treats the standalone cmdline option `../111/env.xml` as a reference to a test file, and this is done before `--env` is actually added to the parser by the plugins.
I understand that plugins cannot be properly loaded before the cmdline is pre-parsed, and thus it is impossible to add all cmdline options before cmdline parsing.
Yet, python's `argparse` accepts both `--opt=val` and `--opt val` notations, so this is the expected behaviour. So, probably, preparsing or rootdir detection should be done a bit more carefully.
PS:
- Mac OS X 10.11 (does not matter)
- Python-2.7.10
- pytest-2.9.1
- no other packages needed
author:
url:https://github.com/nolar
type:Person
name:nolar
datePublished:2016-03-22T09:57:34.000Z
interactionStatistic:
type:InteractionCounter
interactionType:https://schema.org/CommentAction
userInteractionCount:2
url:https://github.com/1471/pytest/issues/1471
context:https://schema.org
headline:Py.test improperly handles command line options with spaces
articleBody:A sample script:
```
#conftest.py
import pytest
@pytest.hookimpl
def pytest_addoption(parser):
parser.addoption('--env', action='store', dest='env')
```
```
#mytest.py
def test_me(request):
print(request.config.option.env)
```
A sample command that fails:
```
$ touch pytest.ini
$ py.test --env ../111/env.xml --capture=no mytest.py
usage: py.test [options] [file_or_dir] [file_or_dir] [...]
py.test: error: unrecognized arguments: --env mytest.py
inifile: None
rootdir: /Users/svasilyev/parent
```
Where `/Users/svasilyev/parent` is a parent dir for the sample scripts dir (they are in /Users/svasilyev/parent/pytest-cmdline-sample).
The error happens only when `../111/env.xml` actually exists, and it is outside of the current dir with `conftest.py` & `pytest.ini`.
The error does NOT happen when:
- ... the target file does not exists (even if it points to outer dir), or this is not a filename (just by accident, like "no" in `--capture no` notation).
- ... the file exists, but it is in the local dir or any subdir: `py.test --env ./env.xml --capture=no mytest.py`.
- ... cmdline options are in this order: `py.test --capture=no --env ../111/env.xml mytest.py` (surprise!)
- β¦ the same space-notation is used for built-in options (e.g., `--junit-xml ../111/junit.xml`)
I guess the error is caused by py.test's cmdline pre-parsing and rootdir detection: it treats the standalone cmdline option `../111/env.xml` as a reference to a test file, and this is done before `--env` is actually added to the parser by the plugins.
I understand that plugins cannot be properly loaded before the cmdline is pre-parsed, and thus it is impossible to add all cmdline options before cmdline parsing.
Yet, python's `argparse` accepts both `--opt=val` and `--opt val` notations, so this is the expected behaviour. So, probably, preparsing or rootdir detection should be done a bit more carefully.
PS:
- Mac OS X 10.11 (does not matter)
- Python-2.7.10
- pytest-2.9.1
- no other packages needed
author:
url:https://github.com/nolar
type:Person
name:nolar
datePublished:2016-03-22T09:57:34.000Z
interactionStatistic:
type:InteractionCounter
interactionType:https://schema.org/CommentAction
userInteractionCount:2
url:https://github.com/1471/pytest/issues/1471
Person:
url:https://github.com/nolar
name:nolar
url:https://github.com/nolar
name:nolar
InteractionCounter:
interactionType:https://schema.org/CommentAction
userInteractionCount:2
interactionType:https://schema.org/CommentAction
userInteractionCount:2
External Links {π}(2)
Analytics and Tracking {π}
- Site Verification - Google
Libraries {π}
- Clipboard.js
- D3.js
- Lodash
Emails and Hosting {βοΈ}
Mail Servers:
- aspmx.l.google.com
- alt1.aspmx.l.google.com
- alt2.aspmx.l.google.com
- alt3.aspmx.l.google.com
- alt4.aspmx.l.google.com
Name Servers:
- dns1.p08.nsone.net
- dns2.p08.nsone.net
- dns3.p08.nsone.net
- dns4.p08.nsone.net
- ns-1283.awsdns-32.org
- ns-1707.awsdns-21.co.uk
- ns-421.awsdns-52.com
- ns-520.awsdns-01.net