Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data file is included now #1

Closed
wants to merge 3 commits into from
Closed

Conversation

fish2000
Copy link
Contributor

... with this patch, the file can be found in source tarballs that are generated and/or cheese-shopped using setup.py -- I haven't tried to upload anything from my fork, as per decorum -- and it makes its way properly into the site-packages directory into which Pint is itself installed (via setup.py/PIP/sleazy_install).

  • python setup.py install works ok
  • python tests/test_pint.py generates two errors that I believe are previously existent.

output from the tests in question follows:

ASIO-OTUS:pint[master]$ python tests/test_pint.py
....F.........E...................
======================================================================
ERROR: test_quantity_abs_round (__main__.TestMCO)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/test_pint.py", line 345, in test_quantity_abs_round
    rx = fun(x)
  File "/Users/fish/Dropbox/pint/pint/pint.py", line 671, in __float__
    raise DimensionalityError(self.units, 'dimensionless')
DimensionalityError: Cannot convert from 'meter' to 'dimensionless'.

======================================================================
FAIL: test_dimensionless_units (__main__.TestMCO)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/test_pint.py", line 391, in test_dimensionless_units
    self.assertTrue(Q_(2 * math.pi, 'radian') == Q_(360, 'degree'))
AssertionError: False is not true

----------------------------------------------------------------------
Ran 34 tests in 0.901s

FAILED (failures=1, errors=1)

@hgrecco
Copy link
Owner

hgrecco commented Jul 26, 2012

Thanks for the patches. The test do indeed fail in the original version. Pint is functional but still looking into better ways to do certain things. Just one thing about the patch I think these two lines:

include .gitignore
include cinspect.dump

Should not be there. If you change this and push. I will merge.

Thanks again

@hgrecco
Copy link
Owner

hgrecco commented Jul 31, 2012

Done! Thanks.

@hgrecco hgrecco closed this Jul 31, 2012
bors bot pushed a commit that referenced this pull request Mar 23, 2018
…_cache

Enrico/fix prefix handling on build cache
znicholls referenced this pull request in znicholls/pint Aug 10, 2018
Remove pandas_array import from __init__.py
bors bot pushed a commit that referenced this pull request Sep 22, 2019
Update README to include link to dimensionalanalysis.org
bors bot pushed a commit that referenced this pull request May 6, 2020
bors bot pushed a commit that referenced this pull request Aug 25, 2020
Add feature documentation, merge recent Pint changes
hgrecco pushed a commit that referenced this pull request Feb 22, 2021
@aldo-o aldo-o mentioned this pull request Feb 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants