zhuyifei1999/guppy3

guppy.heapy.test.test_gsl: FileNotFoundError (docexample.gsl)

Closed this issue · 4 comments

Hi,

I pulled the last checkin after v3.0.6 from Master, installed it and tested it. Unfortunately, it seems to be something wrong with how the test skips the test in main() of SpecNodes.py.

There is a check for file not found in SpecNodes.py:

        if not root.os.path.exists(main_dt_name):
            print('%s does not exist, skipping test' % main_dt_name)

However, it seems to be missing a return statement there. I get:

FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.6/dist-packages/guppy3-3.0.6-py3.6-linux-i686.egg/guppy/gsl/../../specs/docexample.gsl'

I put a return after the print above and then the test was skipped and it could continue with the other tests.

As a side note, would it be a bad idea to install the specs/*.gsl files?
I see that I am also not installing those files in Guppy-PE/0.1.11.
But maybe we could consider installing them?

Regards
Sverker

However, it seems to be missing a return statement there. I get:

Oops, I wrote that print thinking it was a raise. My bad. I guess gotta do a post-release then

As a side note, would it be a bad idea to install the specs/*.gsl files?

I'm not sure. As far as I understand the gsl files are used for generating the docs, but there isn't currently an easy way to call genguppydoc.py if it was installed to dist-packages / site-packages.

I also feel like html docs are rarely included in package, unless it's an optional dependency...

Strange that the Travis CI didn't catch it, right? Should it be configured differently?

Travis tests on the repo cloned. Maybe I should make a seperate test to install the package instead and run tests...

Travis also segfaults frequently on test_thread, but I am unable to reproduce with 100 runs of tests locally.

Should now be tested.

I also was finally able to reproduce the random travis failures. Either I should disable malloc hooks or somehow make it thread safe. It just stackoverflowed.