Cort Stratton wrote:
> I'm afraid that still didn't help; I created the tests\regression 
> directory manually and downloaded the __init__.py into the new 
> directory, and it still complains about a non-existant 
> tests.regression module when I run tests\test.py.
>
> Attempting to fool the script by changing the import path to just 
> "import regression" and running the script from within the tests 
> directory gives different (but still not helpful) results: lines and 
> lines and lines of the following error, repeated for every test:
>
> INFO:root:Beginning test at Thu Jul 05 18:16:25 2007
> INFO:root:Capabilities are: GENERIC, WIN
> INFO:root:sys.platform = win32
> INFO:root:Reading test plan from Y:\pyglet-1.0alpha1\tests\plan.txt
> INFO:root:Testing window.WINDOW_OPEN.
> ERROR:root:Cannot load test for window.WINDOW_OPEN
> Traceback (most recent call last):
>   File "Y:\pyglet-1.0alpha1\tests\test.py", line 212, in test
>     module = self.get_module(options.test_root )
>   File "Y:\pyglet-1.0alpha1\tests\test.py", line 194, in get_module
>     module = __import__(name)
> ImportError: No module named tests.window.WINDOW_OPEN
>
> I feel like something pretty fundamental is going wrong here, and that 
> I'll kick myself when I find it.  Any suggestions?

You definitely won't be able to run it from inside the tests directory.  
Assuming tests\__init__.py exists, I suspect your problem is that "." is 
not in your PYTHONPATH (so, when it tries to import tests.regression 
etc, it's only looking within the python lib).

 From the Windows command prompt:

  set PYTHONPATH=.;%PYTHONPATH%

Or if you're using cygwin/bash:

  set PYTHONPATH ".;$PYTHONPATH" && export PYTHONPATH

Or you can set it permanently from the environment variables dialog in 
the advanced tab under My Computer properties.  If there's no PYTHONPATH 
set, create a new value with "." (period).

Cheers
Alex.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to