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

test fail when run the PyPI tarball #2656

Closed
sgn opened this issue Nov 19, 2019 · 5 comments
Closed

test fail when run the PyPI tarball #2656

sgn opened this issue Nov 19, 2019 · 5 comments

Comments

@sgn
Copy link

sgn commented Nov 19, 2019

I'm packaging pelican 4.2.0 by from PyPI tarball.

pytest fail because it doesn't have required files for testing.

FileNotFoundError: [Errno 2] No such file or directory: '/builddir/pelican-4.2.0/pelican/tests/content/article_with_mdown_extension.mdown'

And some other error

Ran 252 tests in 5.992s

FAILED (failures=4, errors=8, skipped=6)
Test failed: <unittest.runner.TextTestResult run=252 errors=8 failures=4>

@sgn
Copy link
Author

sgn commented Nov 19, 2019

Using github generated tarball, I only meet 2 errors.

  • first one requires git, is it desirable?
  • second one is about user warning
======================================================================
FAIL: test_error_on_warning (pelican.tests.test_testsuite.TestSuiteTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/pelican-4.2.0/pelican/tests/test_testsuite.py", line 13, in test_error_on_warning
    warnings.warn('test warning')
AssertionError: UserWarning not raised

----------------------------------------------------------------------

@justinmayer
Copy link
Member

Hi Danh. In what ways is this not a duplicate of #2635 ?

@avaris
Copy link
Member

avaris commented Nov 19, 2019

first one requires git, is it desirable?

Not sure about desirable but it is very convenient and robust to use git diff for comparing outputs.

second one is about user warning

For 4.2 or below you need to use the documented testing method. pytest needs some more nudging to fully work (see: #2650). Next release should be fine.

@sgn
Copy link
Author

sgn commented Nov 20, 2019

Hi Danh. In what ways is this not a duplicate of #2635 ?

Sorry for the noise, I forgot to check the issue list.

first one requires git, is it desirable?

Not sure about desirable but it is very convenient and robust to use git diff for comparing outputs.

Doesn't pytest have something to diff already?
But pulling the whole stack of git for git-diff is not so convenient.
I don't know about Windows but cmp(1) and diff(1) is both specified by POSIX.

@sgn sgn closed this as completed Nov 20, 2019
@avaris
Copy link
Member

avaris commented Nov 20, 2019

I don't disagree. There is a soft assumption that if you're getting pelican from github, you have git already. Which is not necessarily true of course. Platform independent alternative would require time and effort, PRs are welcome :).

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

3 participants