opened
chavz
username_0
I just tried to run nosetest on a fresh gae-init installation, and this is what I get.

when running..
```
13:54 $ nosetests --with-gae --gae-application ./main/ --gae-lib-root /c/Users/CCaberos/AppData/Local/Google/Cloud/AppEngine
```

this is what I get..
```
Traceback (most recent call last):
  File "c:\python27\Lib\runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "c:\python27\Lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "C:\Users\CCaberos\tmp\gae-init-nose\temp\venv\Scripts\nosetests.exe\__main__.py", line 9, in <module>
  File "c:\users\ccaberos\tmp\gae-init-nose\temp\venv\lib\site-packages\nose\core.py", line 121, in __init__
    **extra_args)
  File "c:\python27\Lib\unittest\main.py", line 94, in __init__
    self.parseArgs(argv)
  File "c:\users\ccaberos\tmp\gae-init-nose\temp\venv\lib\site-packages\nose\core.py", line 145, in parseArgs
    self.config.configure(argv, doc=self.usage())
  File "c:\users\ccaberos\tmp\gae-init-nose\temp\venv\lib\site-packages\nose\config.py", line 346, in configure
    self.plugins.configure(options, self)
  File "c:\users\ccaberos\tmp\gae-init-nose\temp\venv\lib\site-packages\nose\plugins\manager.py", line 284, in configure
    cfg(options, config)
  File "c:\users\ccaberos\tmp\gae-init-nose\temp\venv\lib\site-packages\nose\plugins\manager.py", line 99, in __call__
    return self.call(*arg, **kw)
  File "c:\users\ccaberos\tmp\gae-init-nose\temp\venv\lib\site-packages\nose\plugins\manager.py", line 167, in simple
    result = meth(*arg, **kw)
  File "c:\users\ccaberos\tmp\gae-init-nose\temp\venv\lib\site-packages\nosegae.py", line 85, in configure
    import appengine_config
  File "C:\Users\CCaberos\tmp\gae-init-nose\main\appengine_config.py", line 16, in <module>
    re_ = stubs.FakeFile._skip_files.pattern.replace('|^lib/.*', '')
AttributeError: 'NoneType' object has no attribute 'pattern'
```

NoseGae#0.5.9
gae-init#5.5.0

might be related to issue #346, already asked the involved people there for help, but just in case some other people has encountered it and may be able to help.
UnitTest with NoseGae: Unable to load stubs.FakeFile._skip_files.pattern.replace('|^lib/.*', '') when running test
issue
created
chavz
username_0
E     AttributeError: 'NoneType' object has no attribute 'pattern'

main\appengine_config.py:16: AttributeError

```

by the way I'm just using the sample tests provided by google in [localunittesting](https://cloud.google.com/appengine/docs/python/tools/localunittesting), i'm running them directly from nosetests/pytest instead of from the `runner.py`
comment
created
lipis
username_1
I never played with those.. :( Also not much time these days to play around with it..
comment
created
gmist
username_2
``` python
  if stubs.FakeFile._skip_files:
    re_ = stubs.FakeFile._skip_files.pattern.replace('|^lib/.*', '')
    re_ = re.compile(re_)
    stubs.FakeFile._skip_files = re_
  sys.path.insert(0, 'lib')
```
comment
created
lipis
username_1
Did you manage to make it run @username_0?
comment
created
chavz
username_0
E       AttributeError: 'module' object has no attribute 'app'

tests/conftest.py:10: AttributeError
```

neither with  `from main import app`. And replacing `import main` with  `from main import main as mn` and then replacing `app = main.app` with `app = mn.app`, produces a different kind of error, see below:

```
Traceback (most recent call last):
  File "/home/jorge/projects/gae-init/temp/venv/local/lib/python2.7/site-packages/_pytest/config.py", line 337, in _importconftest
    mod = conftestpath.pyimport()
  File "/home/jorge/projects/gae-init/temp/venv/local/lib/python2.7/site-packages/py/_path/local.py", line 650, in pyimport
    __import__(modname)
  File "/home/jorge/projects/gae-init/temp/venv/local/lib/python2.7/site-packages/_pytest/assertion/rewrite.py", line 207, in load_module
    py.builtin.exec_(co, mod.__dict__)
  File "/home/jorge/projects/gae-init/temp/venv/local/lib/python2.7/site-packages/py/_builtin.py", line 221, in exec_
    exec2(obj, globals, locals)
  File "<string>", line 7, in exec2
  File "/home/jorge/projects/gae-init/tests/conftest.py", line 4, in <module>
    from main.main import app as ap
  File "/home/jorge/projects/gae-init/main/main.py", line 19, in <module>
    import auth
  File "/home/jorge/projects/gae-init/main/auth/__init__.py", line 3, in <module>
    from .auth import *
  File "/home/jorge/projects/gae-init/main/auth/auth.py", line 16, in <module>
    import cache
ImportError: No module named cache
ERROR: could not load /home/jorge/projects/gae-init/tests/conftest.py
```

In the end, I'm still trying to wrap my head around all this import issues/rules and stuff that app engine introduces, specially those, stubs and configs, since most of the time, those are where the problems occur.
comment
created
topless
username_3
I stumbled on the same issue, even with @username_2 suggestion, it cannot fails on the previous line `from google.appengine.tools.devappserver2.python import stubs` I followed the paths and tools are not there, I am working on a clean installation with the beta gcloud command if it matters.
comment
created
lipis
username_1
I'm closing this one for now.. if there are still issues.. please report..
comment
closed
lipis
username_1
issue