
GITHUB . COM {
}
Detected CMS Systems:
- Wordpress (2 occurrences)
Title:
Error using parametrize with default arguments Β· Issue #3221 Β· pytest-dev/pytest
Description:
With pytest 3.4.0: import pytest @pytest.mark.parametrize("something", [True, False]) def test_something(something=False): pass You get the error: ../../base/Python.framework/Versions/2.7/lib/python2.7/site-packages/pluggy/__init__.py:61...
Website Age:
17 years and 8 months (reg. 2007-10-09).
Matching Content Categories {π}
- Dating & Relationships
- Personal Finance
- Education
Content Management System {π}
What CMS is github.com built with?
Github.com is powered by 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,653,731 visitors per month in the current month.
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 5,316,083 paying customers.
The estimated monthly recurring revenue (MRR) is $22,327,549.
The estimated annual recurring revenues (ARR) are $267,930,588.
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 {π}
error, pytest, arguments, ronnypfannschmidt, default, issue, basepythonframeworkversionslibpythonsitepackagespluggyinitpy, added, type, parametrize, argument, question, commented, sign, closed, return, kwargs, basepythonframeworkversionslibpythonsitepackagespytestpythonpy, doesnt, problem, topic, source, projects, ndevenish, function, fixtures, related, member, values, bug, status, mentioned, navigation, pytestdev, code, pull, requests, actions, security, call, selfhookexecself, selfnonwrappers, selfwrappers, hookexec, selfinnerhookexechook, methods, lambda, firstresulthookspecoptsgetfirstresult, python, targets,
Topics {βοΈ}
7/site-packages/pluggy/__init__ 7/site-packages/_pytest/python org/en/latest/parametrize source code assigned labels status pytest/_pytest/compat added indicative error [tf-2] added pil personal information error comment metadata assignees pytest ignores arguments regular python interpretation pytest source question general question normal python arguments type projects potential-fixture classification projects milestone inactivity type default-free arguments brianmaissy mentioned topic topic error message //docs potential fixtures error messages completely confusing /base/python addressed type parametrize type default values def test_something framework/versions/2 7/lib/python2 metafunc=metafunc makes sense rigorously discussed wanted developers arg_names = tuple raise exception trivial section make test_types milestone relationships issue parametrize related valid targets github bug problem documentation problem pytest 3
Payment Methods {π}
- Braintree
Questions {β}
- Already have an account?
- Do we need to raise exception here?
Schema {πΊοΈ}
DiscussionForumPosting:
context:https://schema.org
headline:Error using parametrize with default arguments
articleBody:With pytest 3.4.0:
```python
import pytest
@pytest.mark.parametrize("something", [True, False])
def test_something(something=False):
pass
```
You get the error:
```
../../base/Python.framework/Versions/2.7/lib/python2.7/site-packages/pluggy/__init__.py:617: in __call__
return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
../../base/Python.framework/Versions/2.7/lib/python2.7/site-packages/pluggy/__init__.py:222: in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
../../base/Python.framework/Versions/2.7/lib/python2.7/site-packages/pluggy/__init__.py:216: in <lambda>
firstresult=hook.spec_opts.get('firstresult'),
../../base/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/python.py:200: in pytest_pycollect_makeitem
res = list(collector._genfunctions(name, obj))
../../base/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/python.py:378: in _genfunctions
self.ihook.pytest_generate_tests(metafunc=metafunc)
../../base/Python.framework/Versions/2.7/lib/python2.7/site-packages/pluggy/__init__.py:617: in __call__
return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
../../base/Python.framework/Versions/2.7/lib/python2.7/site-packages/pluggy/__init__.py:222: in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
../../base/Python.framework/Versions/2.7/lib/python2.7/site-packages/pluggy/__init__.py:216: in <lambda>
firstresult=hook.spec_opts.get('firstresult'),
../../base/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/python.py:125: in pytest_generate_tests
metafunc.parametrize(*marker.args, **marker.kwargs)
../../base/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/python.py:805: in parametrize
self.function, name, arg))
E ValueError: <function test_something at 0x10e4969b0> uses no argument 'something'
```
It seems pytest is separating the concept of normal python arguments and 'fixtures' here, only classifying only default-free arguments as potential fixtures - and then only considering 'fixtures' as valid targets for parametrisation - but the error message completely obfuscates this: by any regular python interpretation the function *definitely* has an argument 'something'.
The documentation on this - https://docs.pytest.org/en/latest/parametrize.html doesn't show this as an example but also doesn't mention that it's a constraint; it's only through reading the pytest source that I could work out what the problem was.
Related: The wording of this was changed to 'argument' from 'fixture' in https://github.com/pytest-dev/pytest/issues/1539 which makes sense in the context of that error, but only confuses this one.
author:
url:https://github.com/ndevenish
type:Person
name:ndevenish
datePublished:2018-02-14T17:21:32.000Z
interactionStatistic:
type:InteractionCounter
interactionType:https://schema.org/CommentAction
userInteractionCount:5
url:https://github.com/3221/pytest/issues/3221
context:https://schema.org
headline:Error using parametrize with default arguments
articleBody:With pytest 3.4.0:
```python
import pytest
@pytest.mark.parametrize("something", [True, False])
def test_something(something=False):
pass
```
You get the error:
```
../../base/Python.framework/Versions/2.7/lib/python2.7/site-packages/pluggy/__init__.py:617: in __call__
return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
../../base/Python.framework/Versions/2.7/lib/python2.7/site-packages/pluggy/__init__.py:222: in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
../../base/Python.framework/Versions/2.7/lib/python2.7/site-packages/pluggy/__init__.py:216: in <lambda>
firstresult=hook.spec_opts.get('firstresult'),
../../base/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/python.py:200: in pytest_pycollect_makeitem
res = list(collector._genfunctions(name, obj))
../../base/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/python.py:378: in _genfunctions
self.ihook.pytest_generate_tests(metafunc=metafunc)
../../base/Python.framework/Versions/2.7/lib/python2.7/site-packages/pluggy/__init__.py:617: in __call__
return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
../../base/Python.framework/Versions/2.7/lib/python2.7/site-packages/pluggy/__init__.py:222: in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
../../base/Python.framework/Versions/2.7/lib/python2.7/site-packages/pluggy/__init__.py:216: in <lambda>
firstresult=hook.spec_opts.get('firstresult'),
../../base/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/python.py:125: in pytest_generate_tests
metafunc.parametrize(*marker.args, **marker.kwargs)
../../base/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/python.py:805: in parametrize
self.function, name, arg))
E ValueError: <function test_something at 0x10e4969b0> uses no argument 'something'
```
It seems pytest is separating the concept of normal python arguments and 'fixtures' here, only classifying only default-free arguments as potential fixtures - and then only considering 'fixtures' as valid targets for parametrisation - but the error message completely obfuscates this: by any regular python interpretation the function *definitely* has an argument 'something'.
The documentation on this - https://docs.pytest.org/en/latest/parametrize.html doesn't show this as an example but also doesn't mention that it's a constraint; it's only through reading the pytest source that I could work out what the problem was.
Related: The wording of this was changed to 'argument' from 'fixture' in https://github.com/pytest-dev/pytest/issues/1539 which makes sense in the context of that error, but only confuses this one.
author:
url:https://github.com/ndevenish
type:Person
name:ndevenish
datePublished:2018-02-14T17:21:32.000Z
interactionStatistic:
type:InteractionCounter
interactionType:https://schema.org/CommentAction
userInteractionCount:5
url:https://github.com/3221/pytest/issues/3221
Person:
url:https://github.com/ndevenish
name:ndevenish
url:https://github.com/ndevenish
name:ndevenish
InteractionCounter:
interactionType:https://schema.org/CommentAction
userInteractionCount:5
interactionType:https://schema.org/CommentAction
userInteractionCount:5
External Links {π}(3)
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