pombreda / libkml

Automatically exported from code.google.com/p/libkml
Other
0 stars 0 forks source link

Python test has some failures #22

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. check out rev 246
2. make
3. python kmldom_test.py

What is the expected output? What do you see instead?
6 tests fail.. having to do with style changes

What version of the product are you using? On what operating system?
Ubuntu Linux 7.10 (gutsy), libkml 246

Did you run the unit test suite that comes with the project? Did all test pass?
yes, no

Please provide any additional information below.

--
/home/shared/srcsLocal/libkml_trunk/src/swig$ python kmldom_test.py
..............EEEE....E...............E....
===========================================================
===========
ERROR: testDefault (__main__.SimpleExtendedDataTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "kmldom_test.py", line 440, in testDefault
    assert 0 == self.extendeddata.get_data_array_size()
  File "/home/shared/srcsLocal/libkml_trunk/src/swig/kmldom.py", line 657, in 
get_data_array_size
    def get_data_array_size(*args): return _kmldom.ExtendedData_get_data_array_size(*args)
AttributeError: 'module' object has no attribute 
'ExtendedData_get_data_array_size'

===========================================================
===========
ERROR: testDefault (__main__.SimpleIconStyleTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "kmldom_test.py", line 477, in testDefault
    TestColorStyle(self.iconstyle)
  File "kmldom_test.py", line 447, in TestColorStyle
    assert not colorstyle.has_color()
  File "/home/shared/srcsLocal/libkml_trunk/src/swig/kmldom.py", line 403, in has_color
    def has_color(*args): return _kmldom.ColorStyle_has_color(*args)
AttributeError: 'module' object has no attribute 'ColorStyle_has_color'

===========================================================
===========
ERROR: testDefault (__main__.SimpleLabelStyleTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "kmldom_test.py", line 491, in testDefault
    TestColorStyle(self.labelstyle)
  File "kmldom_test.py", line 447, in TestColorStyle
    assert not colorstyle.has_color()
  File "/home/shared/srcsLocal/libkml_trunk/src/swig/kmldom.py", line 403, in has_color
    def has_color(*args): return _kmldom.ColorStyle_has_color(*args)
AttributeError: 'module' object has no attribute 'ColorStyle_has_color'

===========================================================
===========
ERROR: testDefault (__main__.SimpleLineStyleTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "kmldom_test.py", line 505, in testDefault
    TestColorStyle(self.linestyle)
  File "kmldom_test.py", line 447, in TestColorStyle
    assert not colorstyle.has_color()
  File "/home/shared/srcsLocal/libkml_trunk/src/swig/kmldom.py", line 403, in has_color
    def has_color(*args): return _kmldom.ColorStyle_has_color(*args)
AttributeError: 'module' object has no attribute 'ColorStyle_has_color'

===========================================================
===========
ERROR: testDefault (__main__.SimplePolyStyleTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "kmldom_test.py", line 865, in testDefault
    TestColorStyle(self.polystyle)
  File "kmldom_test.py", line 447, in TestColorStyle
    assert not colorstyle.has_color()
  File "/home/shared/srcsLocal/libkml_trunk/src/swig/kmldom.py", line 403, in has_color
    def has_color(*args): return _kmldom.ColorStyle_has_color(*args)
AttributeError: 'module' object has no attribute 'ColorStyle_has_color'

===========================================================
===========
ERROR: testDefault (__main__.SimpleSchemaTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "kmldom_test.py", line 914, in testDefault
    assert not self.schema.has_id()
  File "/home/shared/srcsLocal/libkml_trunk/src/swig/kmldom.py", line 361, in has_id
    def has_id(*args): return _kmldom.Object_has_id(*args)
TypeError: in method 'Object_has_id', argument 1 of type 'kmldom::Object *'

----------------------------------------------------------------------
Ran 43 tests in 0.015s

FAILED (errors=6)
--
ALSO:
minor gotcha in configure.. 
 --
checking curl/curl.h usability... yes
checking curl/curl.h presence... yes
checking for curl/curl.h... yes
configure: WARNING: no curl.h
checking for curl_easy_init in -lcurl... yes

Original issue reported on code.google.com by brian.da...@gmail.com on 7 Aug 2008 at 6:44

GoogleCodeExporter commented 9 years ago
make sure you're pointing at the right python libs.
looks like you're hitting 0.3-vintage kmldom
(there was a minor change to ExtendedData to
better match the OGC KML XSD: one array for Data
and one array for SchemData)

yes, the curl message is a known issue

Original comment by bent.hag...@gmail.com on 8 Aug 2008 at 4:43

GoogleCodeExporter commented 9 years ago
hmmm.. how to tell?  I see no version string.. kmldom.py and kmlengine.py in 
site-packages are the right date.. 

Original comment by brian.da...@gmail.com on 8 Aug 2008 at 10:12

GoogleCodeExporter commented 9 years ago
/usr/local/lib/libkml*  are all the right date

Original comment by brian.da...@gmail.com on 8 Aug 2008 at 10:16

GoogleCodeExporter commented 9 years ago
make sure your PYTHONPATH is pointing to the right libs. I think you're talking 
to an
old instance of _kmldom.so. I did the following just now and all looks fine to 
me:

[mashbridge@hex:swig]$ ls -l /usr/local/lib/python2.4/site-packages/
total 3164
-rw-r--r-- 1 root staff 2757305 Aug 19 08:37 _kmldom.so
-rw-r--r-- 1 root staff  304386 Aug 19 08:37 _kmlengine.so
-rw-r--r-- 1 root staff  153549 Aug 19 08:37 kmldom.py
-rw-r--r-- 1 root staff    3423 Aug 19 08:37 kmlengine.py

[mashbridge@hex:swig]$ export PYTHONPATH=/usr/local/lib/python2.4/site-packages

[mashbridge@hex:swig]$ ./kmldom_test.py && ./kmlengine_test.py
...........................................
----------------------------------------------------------------------
Ran 43 tests in 0.006s

OK
.........
----------------------------------------------------------------------
Ran 9 tests in 0.001s

OK

Original comment by kml.mash...@gmail.com on 19 Aug 2008 at 3:42

GoogleCodeExporter commented 9 years ago
marking as invalid. please reopen if repointing PYTHONPATH doesn't fix your 
issue.

Original comment by kml.mash...@gmail.com on 15 Sep 2008 at 7:35