Created
February 5, 2021 22:32
-
-
Save rmcgibbo/23a665a147f3106f4fb38d36aaf83c2d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=================================== FAILURES =================================== | |
___________________ TestPelican.test_basic_generation_works ____________________ | |
[gw1] linux -- Python 3.8.7 /nix/store/wkw6fsjasr7jbbrlakxxpbiapa8hws42-python3-3.8.7/bin/python3.8 | |
self = <pelican.tests.test_pelican.TestPelican testMethod=test_basic_generation_works> | |
def test_basic_generation_works(self): | |
# when running pelican without settings, it should pick up the default | |
# ones and generate correct output without raising any exception | |
settings = read_settings(path=None, override={ | |
'PATH': INPUT_PATH, | |
'OUTPUT_PATH': self.temp_path, | |
'CACHE_PATH': self.temp_cache, | |
'LOCALE': locale.normalize('en_US'), | |
}) | |
pelican = Pelican(settings=settings) | |
mute(True)(pelican.run)() | |
> self.assertDirsEqual( | |
self.temp_path, os.path.join(OUTPUT_PATH, 'basic')) | |
pelican/tests/test_pelican.py:107: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <pelican.tests.test_pelican.TestPelican testMethod=test_basic_generation_works> | |
left_path = '/build/pelicantests.pgqtlmi9' | |
right_path = '/build/source/pelican/tests/output/basic' | |
def assertDirsEqual(self, left_path, right_path): | |
out, err = subprocess.Popen( | |
['/nix/store/v4kfpiw1lqw0w6m2af5am7cvvs3i6xyk-git-2.30.0/bin/git', 'diff', '--no-ext-diff', '--exit-code', | |
'-w', left_path, right_path], | |
env={'PAGER': ''}, | |
stdout=subprocess.PIPE, | |
stderr=subprocess.PIPE | |
).communicate() | |
def ignorable_git_crlf_errors(line): | |
# Work around for running tests on Windows | |
for msg in [ | |
"LF will be replaced by CRLF", | |
"CRLF will be replaced by LF", | |
"The file will have its original line endings"]: | |
if msg in line: | |
return True | |
return False | |
if err: | |
err = '\n'.join([line for line in err.decode('utf8').splitlines() | |
if not ignorable_git_crlf_errors(line)]) | |
> assert not out, out | |
E AssertionError: b'diff --git a/build/pelicantests.pgqtlmi9/feeds/all-en.atom.xml b/build/source/pelican/tests/output/basic/feeds/all-e...> | |
E <p>Lovely.</p> | |
E </div> | |
E <div class="section" id="testing-even-more-sourcecode-directives"> | |
E ' | |
E assert not b'diff --git a/build/pelicantests.pgqtlmi9/feeds/all-en.atom.xml b/build/source/pelican/tests/output/basic/feeds/all-e...r></s> | |
pelican/tests/test_pelican.py:78: AssertionError | |
------------------------------ Captured log call ------------------------------- | |
WARNING pelican.settings:log.py:157 Feeds generated without SITEURL set properly may not be valid | |
WARNING pelican.settings:log.py:157 No timezone information specified in the settings. Assuming your timezone is UTC for feed generation. Check > | |
ERROR pelican.contents:log.py:162 Skipping /build/source/samples/content/pages/jinja2_template.html: could not find information about 'title' | |
WARNING pelican.contents:log.py:157 Unable to find '/images/Fat_Cat.jpg', skipping url replacement. | |
___________________ TestPelican.test_custom_generation_works ___________________ | |
[gw1] linux -- Python 3.8.7 /nix/store/wkw6fsjasr7jbbrlakxxpbiapa8hws42-python3-3.8.7/bin/python3.8 | |
self = <pelican.tests.test_pelican.TestPelican testMethod=test_custom_generation_works> | |
def test_custom_generation_works(self): | |
# the same thing with a specified set of settings should work | |
settings = read_settings(path=SAMPLE_CONFIG, override={ | |
'PATH': INPUT_PATH, | |
'OUTPUT_PATH': self.temp_path, | |
'CACHE_PATH': self.temp_cache, | |
'LOCALE': locale.normalize('en_US.UTF-8'), | |
}) | |
pelican = Pelican(settings=settings) | |
mute(True)(pelican.run)() | |
> self.assertDirsEqual( | |
self.temp_path, os.path.join(OUTPUT_PATH, 'custom')) | |
pelican/tests/test_pelican.py:124: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <pelican.tests.test_pelican.TestPelican testMethod=test_custom_generation_works> | |
left_path = '/build/pelicantests.t6vhzk47' | |
right_path = '/build/source/pelican/tests/output/custom' | |
def assertDirsEqual(self, left_path, right_path): | |
out, err = subprocess.Popen( | |
['/nix/store/v4kfpiw1lqw0w6m2af5am7cvvs3i6xyk-git-2.30.0/bin/git', 'diff', '--no-ext-diff', '--exit-code', | |
'-w', left_path, right_path], | |
env={'PAGER': ''}, | |
stdout=subprocess.PIPE, | |
stderr=subprocess.PIPE | |
).communicate() | |
def ignorable_git_crlf_errors(line): | |
# Work around for running tests on Windows | |
for msg in [ | |
"LF will be replaced by CRLF", | |
"CRLF will be replaced by LF", | |
"The file will have its original line endings"]: | |
if msg in line: | |
return True | |
return False | |
if err: | |
err = '\n'.join([line for line in err.decode('utf8').splitlines() | |
if not ignorable_git_crlf_errors(line)]) | |
> assert not out, out | |
E AssertionError: b'diff --git a/build/pelicantests.t6vhzk47/feeds/alexis-metaireau.atom.xml b/build/source/pelican/tests/output/custom/...> | |
E <p>Lovely.</p> | |
E </div> | |
E <div class="section" id="testing-even-more-sourcecode-directives"> | |
E ' | |
E assert not b'diff --git a/build/pelicantests.t6vhzk47/feeds/alexis-metaireau.atom.xml b/build/source/pelican/tests/output/custom/...r></s> | |
pelican/tests/test_pelican.py:78: AssertionError | |
=========================== short test summary info ============================ | |
FAILED pelican/tests/test_pelican.py::TestPelican::test_basic_generation_works | |
FAILED pelican/tests/test_pelican.py::TestPelican::test_custom_generation_works | |
======================== 2 failed, 251 passed in 4.82s ========================= |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment