Harden tests, make them compatible with new buildout.

parent a5cf4f1c
...@@ -92,6 +92,7 @@ Then let's run the buildout:: ...@@ -92,6 +92,7 @@ Then let's run the buildout::
Let's take a look at the buildout parts directory now:: Let's take a look at the buildout parts directory now::
>>> ls(sample_buildout, 'parts') >>> ls(sample_buildout, 'parts')
d buildout
d git-clone d git-clone
When updating, it will do a "git fetch; git reset @{upstream}":: When updating, it will do a "git fetch; git reset @{upstream}"::
...@@ -122,19 +123,21 @@ Then let's run the buildout:: ...@@ -122,19 +123,21 @@ Then let's run the buildout::
>>> print system(buildout) >>> print system(buildout)
Uninstalling git-clone. Uninstalling git-clone.
Running uninstall recipe.
Installing git-clone. Installing git-clone.
Cloning into '/sample-buildout/parts/git-clone'... Cloning into '/sample-buildout/parts/git-clone'...
Let's take a look at the buildout parts directory now:: Let's take a look at the buildout parts directory now::
>>> ls(sample_buildout, 'parts') >>> ls(sample_buildout, 'parts')
d buildout
d git-clone d git-clone
And let's see that current branch is "build":: And let's see that current branch is "build"::
>>> import subprocess >>> import subprocess
>>> cd('parts', 'git-clone') >>> cd('parts', 'git-clone')
>>> subprocess.check_output(['git', 'branch']) >>> print subprocess.check_output(['git', 'branch'])
'* build\n' * build
When updating, it will do a "git fetch; git reset build":: When updating, it will do a "git fetch; git reset build"::
...@@ -166,20 +169,22 @@ Then let's run the buildout:: ...@@ -166,20 +169,22 @@ Then let's run the buildout::
>>> print system(buildout) >>> print system(buildout)
Uninstalling git-clone. Uninstalling git-clone.
Running uninstall recipe.
Installing git-clone. Installing git-clone.
Cloning into '/sample-buildout/parts/git-clone'... Cloning into '/sample-buildout/parts/git-clone'...
Let's take a look at the buildout parts directory now:: Let's take a look at the buildout parts directory now::
>>> ls(sample_buildout, 'parts') >>> ls(sample_buildout, 'parts')
d buildout
d git-clone d git-clone
And let's see that current branch is "gitclone":: And let's see that current revision is "2566127"::
>>> import subprocess >>> import subprocess
>>> cd(sample_buildout, 'parts', 'git-clone') >>> cd(sample_buildout, 'parts', 'git-clone')
>>> subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD']) >>> print subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD'])
'2566127\n' 2566127
When updating, it will do a "git fetch; git reset revision":: When updating, it will do a "git fetch; git reset revision"::
...@@ -187,7 +192,8 @@ When updating, it will do a "git fetch; git reset revision":: ...@@ -187,7 +192,8 @@ When updating, it will do a "git fetch; git reset revision"::
>>> print system(buildout) >>> print system(buildout)
Updating git-clone. Updating git-clone.
Fetching origin Fetching origin
HEAD is now at ... HEAD is now at 2566127 ...
Empty revision/branch Empty revision/branch
--------------------- ---------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment