From 0f4058a3170724cc1709837c1d8f89d364c08bf5 Mon Sep 17 00:00:00 2001 From: bmcorser Date: Sat, 24 Aug 2013 13:42:55 +0100 Subject: [PATCH] Add regressison test for recursively copying files --- pelican/tests/test_pelican.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/pelican/tests/test_pelican.py b/pelican/tests/test_pelican.py index d6c0d8e9..db2d0e6b 100644 --- a/pelican/tests/test_pelican.py +++ b/pelican/tests/test_pelican.py @@ -92,3 +92,22 @@ class TestPelican(LoggedTestCase): mute(True)(pelican.run)() dcmp = dircmp(self.temp_path, os.path.join(OUTPUT_PATH, 'custom')) self.assertFilesEqual(recursiveDiff(dcmp)) + + def test_theme_static_paths_copy(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, + 'THEME_STATIC_PATHS': [os.path.join(SAMPLES_PATH, 'very'), + os.path.join(SAMPLES_PATH, 'theme_standard')] + }) + pelican = Pelican(settings=settings) + mute(True)(pelican.run)() + theme_output = os.path.join(self.temp_path, 'theme') + extra_path = os.path.join(theme_output, 'exciting', 'new', 'files') + + for file in ['a_stylesheet', 'a_template']: + self.assertTrue(os.path.exists(os.path.join(theme_output, file))) + + for file in ['wow!', 'boom!', 'bap!']: + self.assertTrue(os.path.exists(os.path.join(extra_path, file)))