laempy / pyoints

Pyoints: A Python package for point cloud, voxel and raster processing.
Other
42 stars 8 forks source link

about [python] Test #13

Open andrewrgarcia opened 3 years ago

andrewrgarcia commented 3 years ago

First and foremost, great development work. I was just wondering if failing 2 tests from test_pyoints.py still needed me to take further action to make the pyoints module work well. I am running Ubuntu 20.04 LTS and Python 3.8.3 (default, Jul 2 2020, 16:21:59)

...............Run doctests for Pyoints 0.2.0
...................../home/andrew/pyoints/pyoints/georecords.py:216: UserWarning: 'proj' not set, so I assume '+proj=latlong +datum=WGS84 +to +proj=latlong +datum=WGS84 +units=m +no_defs'
  warnings.warn("'proj' not set, so I assume '%s'" % proj.proj4)
.........................................../home/andrew/anaconda3/lib/python3.8/site-packages/numpy/core/numeric.py:207: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  a = empty(shape, dtype, order)
...FF............................................................
======================================================================
FAIL: GeoTransform (pyoints.projection)
Doctest: pyoints.projection.GeoTransform
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/andrew/anaconda3/lib/python3.8/doctest.py", line 2204, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for pyoints.projection.GeoTransform
  File "/home/andrew/pyoints/pyoints/projection.py", line 161, in GeoTransform

----------------------------------------------------------------------
File "/home/andrew/pyoints/pyoints/projection.py", line 187, in pyoints.projection.GeoTransform
Failed example:
    print_rounded(tCoords, 3)
Expected:
    [[ 2560446.801  5537522.386]
     [ 2560808.009  5537303.984]
     [ 2564724.211  5539797.116]
     [ 2566007.32   5552049.646]]
Got:
    [[ 2560396.394  5537394.098]
     [ 2560757.556  5537175.718]
     [ 2564673.297  5539668.53 ]
     [ 2565956.354  5551919.643]]

======================================================================
FAIL: Proj (pyoints.projection)
Doctest: pyoints.projection.Proj
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/andrew/anaconda3/lib/python3.8/doctest.py", line 2204, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for pyoints.projection.Proj
  File "/home/andrew/pyoints/pyoints/projection.py", line 38, in Proj

----------------------------------------------------------------------
File "/home/andrew/pyoints/pyoints/projection.py", line 63, in pyoints.projection.Proj
Failed example:
    print('AUTHORITY["EPSG","4326"]' in proj.wkt)
Expected:
    True
Got:
    False
----------------------------------------------------------------------
File "/home/andrew/pyoints/pyoints/projection.py", line 73, in pyoints.projection.Proj
Failed example:
    print('AUTHORITY["EPSG","4326"]' in proj.wkt)
Expected:
    True
Got:
    False

----------------------------------------------------------------------
Ran 144 tests in 3.743s

FAILED (failures=2)

Once again, great work on this module. I hope to use it on my research and will gladly cite you if so. Regards, Andrew

mavavilj commented 3 years ago

I have this same problem. Was really interested in trying the library, but now it seems like maybe it's buggy. I'm on Windows, Python 3.5 and installation from source (https://github.com/laempy/pyoints#installation-from-source).