papermill icon indicating copy to clipboard operation
papermill copied to clipboard

Running tests produces lots of output

Open betatim opened this issue 7 years ago • 3 comments

I just setup a new dev environment for papermill with conda create ... and then pip install -r requirements-dev.txt and executed pytest in the top level directory of the repository.

The tests pass but I end up with several screens full of:

/Users/username/miniconda/envs/papermill/lib/python3.6/importlib/_bootstrap.py:219: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__
  return f(*args, **kwds)

and other warnings that come from papermill itself like:

/Users/username/git/nteract/papermill/papermill/iorw.py:46: UserWarning: The specified input file (/Users/username/git/nteract/papermill/papermill/tests/parameters/example.yaml) does not end in '.ipynb' or '.json'
  "The specified input file ({}) does not end in '.ipynb' or '.json'".format(path)

Does anyone know what causes the first kind of error/console output? I'd like to work on removing/reducing it. Lots of noisy output from our tests that is "known to be harmless" trains us in ignoring the output (at least it trains me to do that). The warnings from inside papermill are probably easier to track down/capture.

betatim avatar Oct 08 '18 13:10 betatim

I agree we should do some message cleanup for tests.

I'm not sure about the first one. I don't see it with virtualenv, so maybe a conda setup item?

The second one (and a bunch of others) we can clean up easily.

MSeal avatar Oct 13 '18 06:10 MSeal

I remember that I have added those warnings if the user specifies any invalid format for file. Do we need to clean it?

shall I clean up those warning statements?

harsham4026 avatar Nov 06 '18 10:11 harsham4026

For those message we mostly we need to suppress what we're testing for from reaching the console. Might need some tinkering with our mocks to get right.

MSeal avatar Nov 06 '18 18:11 MSeal