
GITHUB . COM {
}
Detected CMS Systems:
- Wordpress (2 occurrences)
Title:
`assert a == approx(b)` when `b` is dict containing zero value results in ZeroDivisionError Β· Issue #10533 Β· pytest-dev/pytest
Description:
Pytest behaves differently when comparing dictionaries containing zero values compared to lists containing same values pytest==7.2.0 Ubuntu 22.04 import pytest def test_foo_dict(): a = {'foo...
Website Age:
17 years and 9 months (reg. 2007-10-09).
Matching Content Categories {π}
- Cryptocurrency
- Business & Finance
- Dating & Relationships
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,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 5,013,426 paying customers.
The estimated monthly recurring revenue (MRR) is $21,056,387.
The estimated annual recurring revenues (ARR) are $252,676,649.
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 {π}
othervalue, assert, jayendrapatil, maxreldiff, def, max, pytest, issue, foo, absapproxvalueexpected, maxabsdiff, sign, zerodivisionerror, pytestapproxb, type, check, approxvalue, approxvalueexpected, projects, testfoodict, testfoolist, assertionerror, approx, index, added, problem, absdiff, navigation, pull, requests, actions, security, approxb, dict, results, closed, values, failed, extratestpytestissuepy, difference, bug, addressed, commented, contributor, snippet, reprcompare, function, class, divisor, pytestsrcpytestpythonapipy,
Topics {βοΈ}
/home/arkanoid/test/venv/lib/python3 10/site-packages/_pytest/python_api def _repr_compare function type projects update dependency pytest addressed type personal information `assert max absolute difference max relative difference projects milestone pytest/python_api 0e-12 extra/test_pytest_issue values pytest==7 extra/test_pytest_issue add check comparing dictionaries values compared assertionerror pytest_assertion plugin details failed float division faulty __repr__ comparison failed mismatched elements class approxnumpy class approxmapping suggested change milestone relationships assert {'foo' max_rel_diff = max max_abs_diff = max bug problem max_rel_diff = math == pytest other_value = get_value_from_nested_list github 5c5ca77 sign approx_value = get_value_from_nested_list abs_diff = abs expected - other_value abs_diff / abs assert [42 zerodivisionerror check 0e-12} py 0e-12] problem abs_diff max_rel_diff
Payment Methods {π}
- Braintree
Questions {β}
- Already have an account?
Schema {πΊοΈ}
DiscussionForumPosting:
context:https://schema.org
headline:`assert a == approx(b)` when `b` is dict containing zero value results in ZeroDivisionError
articleBody:Pytest behaves differently when comparing dictionaries containing zero values compared to lists containing same values
pytest==7.2.0
Ubuntu 22.04
```python
import pytest
def test_foo_dict():
a = {'foo': 42.0}
b = {'foo': 0.0}
assert a == pytest.approx(b) # ZeroDivisionError in pytest/python_api.py
def test_foo_list():
a = [42.0]
b = [0.0]
assert a == pytest.approx(b) # OK
```
```python
_____________________ test_foo_dict
def test_foo_dict():
a = {'foo': 42.0}
b = {'foo': 0.0}
> assert a == pytest.approx(b)
E AssertionError: assert {'foo': 42.0} == approx({'foo': 0.0 Β± 1.0e-12})
E (pytest_assertion plugin: representation of details failed: /home/arkanoid/test/venv/lib/python3.10/site-packages/_pytest/python_api.py:274: ZeroDivisionError: float division by zero.
E Probably an object has a faulty __repr__.)
extra/test_pytest_issue.py:9: AssertionError
_____________________ test_foo_list
def test_foo_list():
a = [42.0]
b = [0.0]
> assert a == pytest.approx(b)
E assert [42.0] == approx([0.0 Β± 1.0e-12])
E comparison failed. Mismatched elements: 1 / 1:
E Max absolute difference: 42.0
E Max relative difference: 1.0
E Index | Obtained | Expected
E 0 | 42.0 | 0.0 Β± 1.0e-12
extra/test_pytest_issue.py:15: AssertionError
```
author:
url:https://github.com/arkanoid87
type:Person
name:arkanoid87
datePublished:2022-11-25T20:13:01.000Z
interactionStatistic:
type:InteractionCounter
interactionType:https://schema.org/CommentAction
userInteractionCount:2
url:https://github.com/10533/pytest/issues/10533
context:https://schema.org
headline:`assert a == approx(b)` when `b` is dict containing zero value results in ZeroDivisionError
articleBody:Pytest behaves differently when comparing dictionaries containing zero values compared to lists containing same values
pytest==7.2.0
Ubuntu 22.04
```python
import pytest
def test_foo_dict():
a = {'foo': 42.0}
b = {'foo': 0.0}
assert a == pytest.approx(b) # ZeroDivisionError in pytest/python_api.py
def test_foo_list():
a = [42.0]
b = [0.0]
assert a == pytest.approx(b) # OK
```
```python
_____________________ test_foo_dict
def test_foo_dict():
a = {'foo': 42.0}
b = {'foo': 0.0}
> assert a == pytest.approx(b)
E AssertionError: assert {'foo': 42.0} == approx({'foo': 0.0 Β± 1.0e-12})
E (pytest_assertion plugin: representation of details failed: /home/arkanoid/test/venv/lib/python3.10/site-packages/_pytest/python_api.py:274: ZeroDivisionError: float division by zero.
E Probably an object has a faulty __repr__.)
extra/test_pytest_issue.py:9: AssertionError
_____________________ test_foo_list
def test_foo_list():
a = [42.0]
b = [0.0]
> assert a == pytest.approx(b)
E assert [42.0] == approx([0.0 Β± 1.0e-12])
E comparison failed. Mismatched elements: 1 / 1:
E Max absolute difference: 42.0
E Max relative difference: 1.0
E Index | Obtained | Expected
E 0 | 42.0 | 0.0 Β± 1.0e-12
extra/test_pytest_issue.py:15: AssertionError
```
author:
url:https://github.com/arkanoid87
type:Person
name:arkanoid87
datePublished:2022-11-25T20:13:01.000Z
interactionStatistic:
type:InteractionCounter
interactionType:https://schema.org/CommentAction
userInteractionCount:2
url:https://github.com/10533/pytest/issues/10533
Person:
url:https://github.com/arkanoid87
name:arkanoid87
url:https://github.com/arkanoid87
name:arkanoid87
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
- GSAP
- 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