Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileNotFoundError when running green's own tests #197

Closed
Ogaday opened this issue Oct 30, 2018 · 2 comments
Closed

FileNotFoundError when running green's own tests #197

Ogaday opened this issue Oct 30, 2018 · 2 comments

Comments

@Ogaday
Copy link
Contributor

Ogaday commented Oct 30, 2018

Looks like a similar bug to #154, but that issue is closed.

Steps to reproduce:

$ git clone git@github.com:CleanCut/green.git
Cloning into 'green'...
remote: Enumerating objects: 4220, done.
remote: Total 4220 (delta 0), reused 0 (delta 0), pack-reused 4220
Receiving objects: 100% (4220/4220), 1.79 MiB | 2.51 MiB/s, done.
Resolving deltas: 100% (2874/2874), done.
$ cd green
$ python3.6 -m virtualenv -p /usr/bin/python3.6 venv
$ source venv/bin/activate
(venv) $ pip install -e .
...
Successfully installed green
(venv) $ green --version
Green 2.13.0, Coverage 4.5.1, Python 3.6.7
(venv) $ green green.test.test_process.TestPoolRunner -vvv
Green 2.13.0, Coverage 4.5.1, Python 3.6.7

green.test.test_process
  TestPoolRunner
.   SyntaxError gets reported as an error loading the unit test
.   Accessing a bad attribute is only reported once (see #150)
.   Exception raised running unit test is reported as an error
.   Runs normally
.   Avoid FileNotFoundError when using a multiprocessing.Value, fixes #154. This test never fails, we have to watch the outer stderr to see if we get output like this:
Traceback (most recent call last):
  File "/usr/lib/python3.6/multiprocessing/util.py", line 262, in _run_finalizers
    finalizer()
  File "/usr/lib/python3.6/multiprocessing/util.py", line 186, in __call__
    res = self._callback(*self._args, **self._kwargs)
  File "/home/ogaday/Code/green/venv/lib/python3.6/shutil.py", line 471, in rmtree
    onerror(os.lstat, path, sys.exc_info())
  File "/home/ogaday/Code/green/venv/lib/python3.6/shutil.py", line 469, in rmtree
    orig_st = os.lstat(path)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmprm5tqg6m/pymp-wwyj7y3l'

Ran 5 tests in 0.118s

OK (passes=5)

I'm running ubuntu 18.04.

Should I be running the tests differently, ie. with make? If this is a bug and not user error, I'm happy to dig into it a bit.

  • Looking at the docstrings, I can see the test that is "failing" - it looks like it's passing but it's not, just as described in the docstring.
@CleanCut
Copy link
Owner

I finally found the time to dig into this. This is a regression in #173 that broke the fix in #154 on some versions of Python on some platforms. I'm surprised it wasn't lighting up TravisCI like a Christmas tree. Fixed it by reverting to the state in #154.

@CleanCut
Copy link
Owner

Fix is in 2.13.1 (just released).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants