GeoscienceAustralia / eqrm

Automatically exported from code.google.com/p/eqrm
Other
5 stars 4 forks source link

test_all failing in windows with python2.7 #26

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. python test_all.py

What do you see instead?

C:\Data\sandpit\eqrm_core>python test_all.py

Testing path C:\Data\sandpit\eqrm_core\eqrm_code\..:

WARNING: File test_event_set_npy.py to be excluded from testing
------- Trying to compile c-extension polygon_ext.c
gcc.exe -c polygon_ext.c -I"C:\Python27\lib\site-packages\numpy\core\include"  -
I"C:\Python27\include" -o "polygon_ext.o" -Wall -O3
gcc.exe -shared polygon_ext.o  -o polygon_ext.pyd "C:\WINDOWS\system32\python27.
dll" -lm
................................................................................
................................................................................
................................................................................
..........................................................E.....................
..............................................................................
======================================================================
ERROR: test_eqrm_flags_to_control_file (test_parse_in_parameters.Test_Parse_in_p
arameters)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Data\sandpit\eqrm_core\eqrm_code\..\eqrm_code\test_parse_in_parameter
s.py", line 248, in test_eqrm_flags_to_control_file
    eqrm_flags = create_parameter_data(file_name)
  File "C:\Data\sandpit\eqrm_core\eqrm_code\..\eqrm_code\parse_in_parameters.py"
, line 542, in create_parameter_data
    _verify_eqrm_flags(eqrm_flags)
  File "C:\Data\sandpit\eqrm_core\eqrm_code\..\eqrm_code\parse_in_parameters.py"
, line 834, in _verify_eqrm_flags
    socket.gethostname()))
AttributeSyntaxError: data_dir c:docume~1\u54709\locals~1\temp\dataDirclb_sr\/ m
ust exist and be accessible from PC-62932

----------------------------------------------------------------------
Ran 398 tests in 5.532s

FAILED (errors=1)

Original issue reported on code.google.com by duncan.g...@gmail.com on 7 Mar 2012 at 4:48

GoogleCodeExporter commented 9 years ago

Original comment by b...@girorosso.com on 8 Mar 2012 at 12:15

GoogleCodeExporter commented 9 years ago
Attempting to reproduce this in my environment.

- Installed Python 2.7.2 via Python(x,y) 2.7.2.1:
Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on win
32
- Installed Shapely for this environment by installing the 1.2.14-py2.7 egg 
with easy_install
- Ran clean_all.py to remove any .pyc and compiled weave functions
- Ran test_all.py on trunk revision 990. The output is

Z:\georisk_models\earthquake\sandpits\ben\eqrm\trunk>python test_all.py

Testing path Z:\georisk_models\earthquake\sandpits\ben\eqrm\trunk\eqrm_code\..:

WARNING: File test_event_set_npy.py to be excluded from testing
------- Trying to compile c-extension polygon_ext.c
gcc.exe -c polygon_ext.c -I"C:\Python27\lib\site-packages\numpy\core\include"  -
I"C:\Python27\include" -o "polygon_ext.o" -Wall -O3
gcc.exe -shared polygon_ext.o  -o polygon_ext.pyd "C:\Python27\python27.dll" -lm

................................................................................
...............................................................Found executable
C:\MinGW32-xy\bin\g++.exe
................................................................................
................................................................................
................................................................................
...............
----------------------------------------------------------------------
Ran 398 tests in 40.375s

OK

Note that revision 981 added the same treatment of the new dir parameters as 
input and output dirs (eqrm_flags_to_control_file -> 
convert_path_string_to_join()). I'm not sure if this is the cause of your 
issue, but just to be safe lets ensure we're working on the same revision.

Original comment by b...@girorosso.com on 8 Mar 2012 at 2:32

GoogleCodeExporter commented 9 years ago
I just updated to revision 1888 and I'm still getting this error.  i did a 
clean_all before-hand.

Original comment by duncan.g...@gmail.com on 14 Mar 2012 at 5:49

GoogleCodeExporter commented 9 years ago
This issue seems to be how join works;
 Note that on Windows, since there is a current directory for each drive, os.path.join("c:", "foo") represents a path relative to the current directory on drive C: (c:foo), not c:\foo.

But that doe not explain why it is working on Ben's system, but not mine.

Original comment by duncan.g...@gmail.com on 15 Mar 2012 at 11:40

GoogleCodeExporter commented 9 years ago
I've moved this issue to won't fix, since it is low priority and not 
reproducible.

Original comment by duncan.g...@gmail.com on 16 Mar 2012 at 1:03

GoogleCodeExporter commented 9 years ago
If I run EQRM from the NAS I don't get this error.  If I run it from c: I get 
the error.  This strengthens the idea that it is how join works that is causing 
the issue.

Original comment by duncan.g...@gmail.com on 16 Mar 2012 at 5:37