Skip to content
Permalink
Browse files

Restore 2.7 invariance testing

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Sep 26, 2015
1 parent 449b873 commit a58c60b22ca7c29a280e162ba84e4ea3c48cfe60
Showing with 6 additions and 6 deletions.
  1. +1 −1 requirements-extras.txt
  2. +2 −2 scripts/getbaseline.sh
  3. +3 −3 tests/test_integration.py
@@ -3,7 +3,7 @@ Markdown>=2.4.0
Jinja2>=2.7.2
pyphen>=0.9.1
micawber>=0.3.0
pygal==2.0.6
pygal>=2.0.0
typogrify>=2.0.4
phpserialize>=1.3
webassets>=0.10.1
@@ -1,8 +1,8 @@
#!/bin/bash
cd tests/data
for i in $@; do
if [[ $i == '3.5' ]]; then
# we only support 3.5 now
if [[ $i == '3.5' || $i == '2.7' ]]; then
# we only support 2.7 and 3.5
wget https://github.com/getnikola/invariant-builds/archive/v$i'.zip'
unzip 'v'$i'.zip'
rm -rf baseline$i
@@ -525,11 +525,11 @@ def fill_site(self):
src1 = os.path.join(os.path.dirname(__file__), 'data', '1-nolinks.rst')
dst1 = os.path.join(self.target_dir, 'posts', '1.rst')
shutil.copy(src1, dst1)
os.system('rm "{0}/stories/creating-a-theme.rst" "{0}/stories/extending.txt" "{0}/stories/internals.txt" "{0}/stories/manual.rst" "{0}/stories/social_buttons.txt" "{0}/stories/theming.rst" "{0}/stories/path_handlers.txt"'.format(self.target_dir))
os.system('rm "{0}/stories/creating-a-theme.rst" "{0}/stories/extending.txt" "{0}/stories/internals.txt" "{0}/stories/manual.rst" "{0}/stories/social_buttons.txt" "{0}/stories/theming.rst" "{0}/stories/path_handlers.txt" "{0}/stories/charts.txt"'.format(self.target_dir))
def test_invariance(self):
"""Compare the output to the canonical output."""
if sys.version_info[0:2] != (3, 5):
pytest.skip('only python 3.5 is supported for invariance')
if sys.version_info[0:2] != (2, 7):
pytest.skip('only python 2.7 is supported for invariance')
good_path = os.path.join(os.path.dirname(__file__), 'data', 'baseline{0[0]}.{0[1]}'.format(sys.version_info))
if not os.path.exists(good_path):
pytest.skip('no baseline found')

0 comments on commit a58c60b

Please sign in to comment.
You can’t perform that action at this time.