
GITHUB . COM {
}
Detected CMS Systems:
- Wordpress (2 occurrences)
Title:
str() on the pytest.raises context variable doesn't behave same as normal exception catch Β· Issue #5412 Β· pytest-dev/pytest
Description:
Pytest 4.6.2, macOS 10.14.5 try: raise LookupError( f"A\n" f"B\n" f"C" ) except LookupError as e: print(str(e)) prints A B C But with pytest.raises(LookupError) as e: raise LookupError( f"A\n" f"B\n" f"C" ) print(str(e)) prints :3: Looku...
Website Age:
17 years and 8 months (reg. 2007-10-09).
Matching Content Categories {π}
- Technology & Computing
- Social Networks
- Video & Online Content
Content Management System {π}
What CMS is github.com built with?
Github.com employs 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,926 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,180 paying customers.
The estimated monthly recurring revenue (MRR) is $22,327,958.
The estimated annual recurring revenues (ARR) are $267,935,490.
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 {π}
nicoddemus, str, exception, fiendish, commented, pytest, issue, lookuperror, mentioned, sign, pytestraises, strevalue, blueyed, stre, type, proposal, feature, requests, projects, context, member, exceptioninfo, repr, makes, added, understand, isnt, asottile, navigation, pull, actions, security, variable, doesnt, behave, normal, catch, closed, raise, fan, fbn, printstre, prints, message, chance, behavior, changed, eliminate, gotcha, pip,
Topics {βοΈ}
pytest/src/_pytest/_code/code nicoddemus edits member 65c2a81 nicoddemus mentioned 2140b9f simonbiggs mentioned full error message comment metadata assignees assigned labels type personal information str type projects raises context variable projects milestone python version exception message pytest release remove exceptioninfo feature type context manager 8 importlib-metadata 0 exceptioninfo objects exceptioninfo object return str [mrg] str bit confusing raises returns return repr user intended good solution simply delete proposal proposal gather opinions ideal outcome isinstance check falling back tests fail milestone relationships exceptions __str__ implements __str__ def __str__ implement __str__ __str__ method raise lookuperror pip list loc = reprfilelocation github makes sense pytest pytest 5 exception feature str
Payment Methods {π}
- Braintree
Questions {β}
- Already have an account?
- Also, @fiendish which Python version are you using?
- Any chance the behavior could be changed to eliminate this gotcha?
- Any chance the behavior could be changed to eliminate this gotcha?
- Thoughts?
- What do you suggest?
Schema {πΊοΈ}
DiscussionForumPosting:
context:https://schema.org
headline:str() on the pytest.raises context variable doesn't behave same as normal exception catch
articleBody:Pytest 4.6.2, macOS 10.14.5
```Python
try:
raise LookupError(
f"A\n"
f"B\n"
f"C"
)
except LookupError as e:
print(str(e))
```
prints
> A
> B
> C
But
```Python
with pytest.raises(LookupError) as e:
raise LookupError(
f"A\n"
f"B\n"
f"C"
)
print(str(e))
```
prints
> <console>:3: LookupError: A
In order to get the full error message, one must do `str(e.value)`, which is documented, but this is a different interaction. Any chance the behavior could be changed to eliminate this gotcha?
-----
Pip list gives
```
Package Version Location
------------------ -------- ------------------------------------------------------
apipkg 1.5
asn1crypto 0.24.0
atomicwrites 1.3.0
attrs 19.1.0
aws-xray-sdk 0.95
boto 2.49.0
boto3 1.9.51
botocore 1.12.144
certifi 2019.3.9
cffi 1.12.3
chardet 3.0.4
Click 7.0
codacy-coverage 1.3.11
colorama 0.4.1
coverage 4.5.3
cryptography 2.6.1
decorator 4.4.0
docker 3.7.2
docker-pycreds 0.4.0
docutils 0.14
ecdsa 0.13.2
execnet 1.6.0
future 0.17.1
idna 2.8
importlib-metadata 0.17
ipaddress 1.0.22
Jinja2 2.10.1
jmespath 0.9.4
jsondiff 1.1.1
jsonpickle 1.1
jsonschema 2.6.0
MarkupSafe 1.1.1
mock 3.0.4
more-itertools 7.0.0
moto 1.3.7
neobolt 1.7.10
neotime 1.7.4
networkx 2.1
numpy 1.15.0
packaging 19.0
pandas 0.24.2
pip 19.1.1
pluggy 0.12.0
prompt-toolkit 2.0.9
py 1.8.0
py2neo 4.2.0
pyaml 19.4.1
pycodestyle 2.5.0
pycparser 2.19
pycryptodome 3.8.1
Pygments 2.3.1
pyOpenSSL 19.0.0
pyparsing 2.4.0
pytest 4.6.2
pytest-cache 1.0
pytest-codestyle 1.4.0
pytest-cov 2.6.1
pytest-forked 1.0.2
python-dateutil 2.7.3
python-jose 2.0.2
pytz 2018.5
PyYAML 5.1
requests 2.21.0
requests-mock 1.5.2
responses 0.10.6
s3transfer 0.1.13
setuptools 41.0.1
six 1.11.0
sqlite3worker 1.1.7
tabulate 0.8.3
urllib3 1.24.3
wcwidth 0.1.7
websocket-client 0.56.0
Werkzeug 0.15.2
wheel 0.33.1
wrapt 1.11.1
xlrd 1.1.0
xmltodict 0.12.0
zipp 0.5.1
```
author:
url:https://github.com/fiendish
type:Person
name:fiendish
datePublished:2019-06-06T13:29:02.000Z
interactionStatistic:
type:InteractionCounter
interactionType:https://schema.org/CommentAction
userInteractionCount:6
url:https://github.com/5412/pytest/issues/5412
context:https://schema.org
headline:str() on the pytest.raises context variable doesn't behave same as normal exception catch
articleBody:Pytest 4.6.2, macOS 10.14.5
```Python
try:
raise LookupError(
f"A\n"
f"B\n"
f"C"
)
except LookupError as e:
print(str(e))
```
prints
> A
> B
> C
But
```Python
with pytest.raises(LookupError) as e:
raise LookupError(
f"A\n"
f"B\n"
f"C"
)
print(str(e))
```
prints
> <console>:3: LookupError: A
In order to get the full error message, one must do `str(e.value)`, which is documented, but this is a different interaction. Any chance the behavior could be changed to eliminate this gotcha?
-----
Pip list gives
```
Package Version Location
------------------ -------- ------------------------------------------------------
apipkg 1.5
asn1crypto 0.24.0
atomicwrites 1.3.0
attrs 19.1.0
aws-xray-sdk 0.95
boto 2.49.0
boto3 1.9.51
botocore 1.12.144
certifi 2019.3.9
cffi 1.12.3
chardet 3.0.4
Click 7.0
codacy-coverage 1.3.11
colorama 0.4.1
coverage 4.5.3
cryptography 2.6.1
decorator 4.4.0
docker 3.7.2
docker-pycreds 0.4.0
docutils 0.14
ecdsa 0.13.2
execnet 1.6.0
future 0.17.1
idna 2.8
importlib-metadata 0.17
ipaddress 1.0.22
Jinja2 2.10.1
jmespath 0.9.4
jsondiff 1.1.1
jsonpickle 1.1
jsonschema 2.6.0
MarkupSafe 1.1.1
mock 3.0.4
more-itertools 7.0.0
moto 1.3.7
neobolt 1.7.10
neotime 1.7.4
networkx 2.1
numpy 1.15.0
packaging 19.0
pandas 0.24.2
pip 19.1.1
pluggy 0.12.0
prompt-toolkit 2.0.9
py 1.8.0
py2neo 4.2.0
pyaml 19.4.1
pycodestyle 2.5.0
pycparser 2.19
pycryptodome 3.8.1
Pygments 2.3.1
pyOpenSSL 19.0.0
pyparsing 2.4.0
pytest 4.6.2
pytest-cache 1.0
pytest-codestyle 1.4.0
pytest-cov 2.6.1
pytest-forked 1.0.2
python-dateutil 2.7.3
python-jose 2.0.2
pytz 2018.5
PyYAML 5.1
requests 2.21.0
requests-mock 1.5.2
responses 0.10.6
s3transfer 0.1.13
setuptools 41.0.1
six 1.11.0
sqlite3worker 1.1.7
tabulate 0.8.3
urllib3 1.24.3
wcwidth 0.1.7
websocket-client 0.56.0
Werkzeug 0.15.2
wheel 0.33.1
wrapt 1.11.1
xlrd 1.1.0
xmltodict 0.12.0
zipp 0.5.1
```
author:
url:https://github.com/fiendish
type:Person
name:fiendish
datePublished:2019-06-06T13:29:02.000Z
interactionStatistic:
type:InteractionCounter
interactionType:https://schema.org/CommentAction
userInteractionCount:6
url:https://github.com/5412/pytest/issues/5412
Person:
url:https://github.com/fiendish
name:fiendish
url:https://github.com/fiendish
name:fiendish
InteractionCounter:
interactionType:https://schema.org/CommentAction
userInteractionCount:6
interactionType:https://schema.org/CommentAction
userInteractionCount:6
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