Skip to content
This repository has been archived by the owner on Jun 25, 2020. It is now read-only.

Commit

Permalink
Add fake identity for VCSs (#104)
Browse files Browse the repository at this point in the history
* Add fake identity for VCSs

This makes the unit tests self contained.

* stop testing unsupported Python versions

* install coverage too

* Update .travis.yml

* Update .travis.yml

* make sure correct python is being used

* the test structure layout is strange in this repo

* Add author name and mail for git
  • Loading branch information
jspricke authored and wjwwood committed Jul 25, 2017
1 parent c793ad8 commit a8dcef1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
21 changes: 6 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,19 @@
language: python
python:
- "2.6"
- "2.7"
- "3.2"
- "3.3"
- "3.4"
- "3.5"
# command to install dependencies
install:
# develop seems to be required by travis since 02/2013
- python setup.py build develop
- python setup.py install
- sudo apt-get clean
- sudo apt-get install -qq zsh
- sudo pip install vcstools nose-cov coverage pyyaml coveralls
# Set git config to silence some stuff in the tests
- git config --global user.email "[email protected]"
- git config --global user.name "Foo Bar"
# Set the hg user
- echo -e "[ui]\nusername = Your Name <[email protected]>" >> ~/.hgrc
# Set the bzr user
- bzr whoami "Your Name <[email protected]>"
- sudo apt-get update && sudo apt-get install -qq zsh
- python -m pip install vcstools nose coverage pyyaml coveralls
# command to run tests
script:
- python -c 'import sys; print(sys.path)'
- nosetests --with-coverage --cover-package=wstool
- python -c 'import coverage'
- python -m nose --with-coverage --cover-package=wstool test/local
notifications:
email: false
after_success:
Expand Down
4 changes: 4 additions & 0 deletions test/scm_test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ class AbstractRosinstallCLITest(unittest.TestCase):
"""Base class for cli tests"""
@classmethod
def setUpClass(self):
os.environ['GIT_AUTHOR_NAME'] = 'Your Name'
os.environ['GIT_COMMITTER_NAME'] = 'Your Name'
os.environ['GIT_AUTHOR_EMAIL'] = '[email protected]'
os.environ['EMAIL'] = 'Your Name <[email protected]>'
self.new_environ = copy.copy(os.environ)
self.new_environ["PYTHONPATH"] = os.path.join(os.getcwd(), "src")
if "ROS_WORKSPACE" in self.new_environ:
Expand Down

0 comments on commit a8dcef1

Please sign in to comment.