Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3c6e5ad

Browse files
committed
chore(tests): test-initialization via script
Fixes#478
1 parentde89429 commit3c6e5ad

File tree

3 files changed

+29
-6
lines changed

3 files changed

+29
-6
lines changed

‎.travis.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,7 @@ install:
1919
-pip install coveralls flake8 sphinx
2020

2121
# generate some reflog as git-python tests need it (in master)
22-
-git tag __testing_point__
23-
-git checkout master || git checkout -b master
24-
-git reset --hard HEAD~1
25-
-git reset --hard HEAD~1
26-
-git reset --hard HEAD~1
27-
-git reset --hard __testing_point__
22+
-./init-tests-after-clone.sh
2823

2924
# as commits are performed with the default user, it needs to be set for travis too
3025
-git config --global user.email "travis@ci.com"

‎README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,29 @@ Both commands will install the required package dependencies.
3434
A distribution package can be obtained for manual installation at:
3535

3636
http://pypi.python.org/pypi/GitPython
37+
38+
If you like to clone from source, you can do it like so:
39+
40+
```bash
41+
git clone https://github.com/gitpython-developers/GitPython
42+
git submodule update --init --recursive
43+
./init-tests-after-clone.sh
44+
```
3745

3846
###RUNNING TESTS
3947

48+
*Important*: Right after cloning this repository, please be sure to have executed the`init-tests-after-clone.sh` script in the repository root. Otherwise you will encounter test failures.
49+
4050
The easiest way to run test is by using[tox](https://pypi.python.org/pypi/tox) a wrapper around virtualenv. It will take care of setting up environnements with the proper dependencies installed and execute test commands. To install it simply:
4151

4252
pip install tox
4353

4454
Then run:
4555

4656
tox
57+
58+
59+
For more fine-grained control, you can use`nose`.
4760

4861
###Contributions
4962

‎init-tests-after-clone.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash -e
2+
3+
if [[-z"$TRAVIS" ]];then
4+
read -p"This operation will destroy locally modified files. Continue ? [N/y]:" answer
5+
if [[!$answer=~ [yY] ]];then
6+
exit 2
7+
fi
8+
fi
9+
10+
git tag __testing_point__
11+
git checkout master|| git checkout -b master
12+
git reset --hard HEAD~1
13+
git reset --hard HEAD~1
14+
git reset --hard HEAD~1
15+
git reset --hard __testing_point__

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp