Main Page
Namespaces
Classes
Files
File List
test
test_requirements.py
Go to the documentation of this file.
1
# Software License Agreement (GPL)
2
#
3
# \file test_requirements.py
4
# \authors Paul Bovbel <pbovbel@locusrobotics.com>
5
# \copyright Copyright (c) (2017,), Locus Robotics, All rights reserved.
6
#
7
# This program is free software: you can redistribute it and/or
8
# modify it under the terms of the GNU General Public License as
9
# published by the Free Software Foundation, either version 2 of the
10
# License, or (at your option) any later version.
11
#
12
# This program is distributed in the hope that it will be useful, but
13
# WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
# General Public License for more details.
16
#
17
# You should have received a copy of the GNU General Public License
18
# along with this program. If not, see <http://www.gnu.org/licenses/>.
19
import
unittest
20
21
from
catkin_virtualenv.requirements
import
VcsRequirement
22
from
packaging.requirements
import
InvalidRequirement
23
24
25
class
TestRequirements
(unittest.TestCase):
26
27
def
test_vcs_requirement_parse
(self):
28
string =
"git+git://github.com/pytransitions/transitions@dev-async#egg=transitions"
29
req =
VcsRequirement
(string)
30
self.assertEqual(req.name,
"transitions"
)
31
32
def
test_vcs_requirement_parse_no_name
(self):
33
string =
"git+git://github.com/pytransitions/transitions@dev-async"
34
with self.assertRaises(InvalidRequirement):
35
_ =
VcsRequirement
(string)
36
37
def
test_vcs_requirement_parse_invalid
(self):
38
string =
"asdf"
39
with self.assertRaises(InvalidRequirement):
40
_ =
VcsRequirement
(string)
catkin_virtualenv.requirements.VcsRequirement
Definition:
requirements.py:24
test_requirements.TestRequirements.test_vcs_requirement_parse_no_name
def test_vcs_requirement_parse_no_name(self)
Definition:
test_requirements.py:32
test_requirements.TestRequirements.test_vcs_requirement_parse_invalid
def test_vcs_requirement_parse_invalid(self)
Definition:
test_requirements.py:37
catkin_virtualenv.requirements
Definition:
requirements.py:1
test_requirements.TestRequirements
Definition:
test_requirements.py:25
test_requirements.TestRequirements.test_vcs_requirement_parse
def test_vcs_requirement_parse(self)
Definition:
test_requirements.py:27
catkin_virtualenv
Author(s): Paul Bovbel
autogenerated on Mon Jul 1 2019 19:33:08