Skip to content

Commit

Permalink
Restore 2.7 invariance testing
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Sep 26, 2015
1 parent 449b873 commit a58c60b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion requirements-extras.txt
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions scripts/getbaseline.sh
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions tests/test_integration.py
Expand Up @@ -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')
Expand Down

0 comments on commit a58c60b

Please sign in to comment.