1
0
Fork 0
forked from github/pelican
Commit graph

19 commits

Author SHA1 Message Date
Pedro H
50af2ed45d Add THEME_TEMPLATE_OVERRIDES. Refs 2021
Allow for overriding individual templates from the theme by configuring
the Jinja2 `Environment` loader to search for templates in the
`THEME_TEMPLATES_OVERRIDES` path before the theme's `templates/`
directory.
2017-10-10 14:33:20 +08:00
derwinlu
8993c55e6e fulfil pep8 standard 2015-08-17 13:34:32 +02:00
Justin Mayer
72a0e626dd Merge pull request #1530 from Sethathi/settings_unit_tests
Unit tests for settings.py
2015-05-21 10:10:37 +02:00
Kevin Yap
6549f51591 Add tests for Pelican and pelican_import tool
Added tests to ensure that:
- THEME and deprecated *_DIR settings result in the expected configurations
- Post headers are formatted correctly in both Markdown and reStructuredText
- Files specified in IGNORE_FILES setting are properly ignored
- Generator.get_files()'s `paths` argument is backwards-compatible with strings
2015-02-17 18:26:41 -08:00
Deniz Turgut
fa269d7c6f Fix tests that were skipped in #1581 2015-02-17 20:50:27 -05:00
George V. Reilly
4c25610cd8 Fix Pelican rendering and unit tests on Windows.
* Fix {filename} links on Windows.
  Otherwise '{filename}/foo/bar.jpg' doesn't work
* Clean up relative Posix path handling in contents.
* Use Posix paths in readers
* Environment for Popen must be strs, not unicodes.
* Ignore Git CRLF warnings.
* Replace CRLFs with LFs in inputs on Windows.
* Fix importer tests
* Fix test_contents
* Fix one last backslash in paginated output
* Skip the remaining failing locale tests on Windows.
* Document the use of forward slashes on Windows.
* Add some Fabric and ghp-import notes
2015-01-25 17:42:53 -08:00
Sethathi Morokole
90edf14beb unit tests for settings.py 2014-11-11 15:26:13 +02:00
Ondrej Grover
6aa0e4346d Add {PAGE,ARTICLE}_PATHS to {ARTICLE,PAGE}_EXCLUDES automatically
This makes it easier for someone to change PAGE_PATHS without the
need to change ARTICLE_EXCLUDES accordingly.
2014-05-14 14:30:21 +02:00
Antoine Brenner
7277c95fb5 Make sure locale is what we want before/after the tests
The locale is a global state, and it was not properly reset to
whatever it was before the unitttest possibly changed it.
This is now fixed.

Not restoring the locale led to weird issues: depending on
the order chosen by "python -m unittest discover" to run
the unit tests, some tests would apparently randomly fail
due to the locale not being what was expected.

For example, test_period_in_timeperiod_archive would
call mock('posts/1970/ 1月/index.html',...) instead of
expected mock('posts/1970/Jan/index.html',...) and fail.
2014-04-15 16:45:45 +02:00
Russ Webber
b527fd594d added testing for default locale setting
removed LOCALE="" from default conf as it looks weird and you
shouldn't need to set a blank LOCALE for the system to work.
2013-07-21 14:12:21 +08:00
W. Trevor King
e9dc1dd478 settings: Make DEFAULT_CONFIG public
This dictionary is accessed by plugins (like `summary`) which add new
settings, so it should be public (i.e. no prefixed underscore).

The changed name length would have led to a re-indenting of the
default contents anyway, so I shifted them all to four spaces.
2013-06-02 13:32:10 -04:00
Dave King
bd54cb1b88 Prevent people from setting STATIC_PATHS to a str
Previously you could accidentally set for example site/css and pelican would iterate through the string and attempt to copy '/' into your output.
2013-03-23 19:56:14 -07:00
W. Trevor King
b59da89e80 Convert '.' and '..' to the less magical os.curdir and os.pardir
While I'm cleaning up path manipulation, I might as well make things
more semantic.
2013-03-21 12:44:44 -04:00
Alexis Métaireau
5aeca4826c Use comments in tests, not docstrings. 2013-03-10 22:42:46 -07:00
Alexis Métaireau
547f8d2e83 Move the tests into pelican. Fix #500 2013-03-06 00:41:27 -08:00
Mario Rodas
3cd84ab396 moving tests dir 2011-07-02 14:41:39 -05:00
Alexis Metaireau
371892ceaa Merge branch tests into main. (See #44)
Conflicts:
	pelican/contents.py
	pelican/settings.py
	samples/pelican.conf.py
2011-05-10 23:18:11 +01:00
Alexis Metaireau
8454b0d1b8 Tests for settings. 2011-01-13 00:46:10 +01:00
Alexis Metaireau
bb96e253c9 Start working on the testsuite. 2011-01-05 16:24:44 +01:00