Beispiel #1
0
 def test_should_not_return_labels(self):
     """ Scenario: no labels """
     # Arrange
     obj = LabelParser()
     # Act
     result = obj.pop_labels()
     # Assert
     self.assertEqual(result, [])
Beispiel #2
0
 def test_should_not_return_labels(self):
     """ Scenario: no labels """
     # Arrange
     obj = LabelParser()
     # Act
     result = obj.pop_labels()
     # Assert
     assert result == []
Beispiel #3
0
 def test_should_return_labels(self):
     """ Scenario: pop labels """
     # Arrange
     obj = LabelParser()
     obj.parse('@label1')
     # Act
     result = obj.pop_labels()
     # Assert
     self.assertEqual(result, ['label1'])
     self.assertEqual(obj._labels, [])
Beispiel #4
0
 def test_should_not_return_labels_when_tag_inside_step(self):
     """ Scenario: no labels when tag inside step"""
     # Arrange
     obj = LabelParser()
     obj.parse("When [email protected]")
     # Act
     result = obj.pop_labels()
     # Assert
     assert result == []
     assert obj._labels == []
Beispiel #5
0
 def test_should_return_labels(self):
     """ Scenario: pop labels """
     # Arrange
     obj = LabelParser()
     obj.parse("@label1")
     # Act
     result = obj.pop_labels()
     # Assert
     assert result == ["label1"]
     assert obj._labels == []
Beispiel #6
0
 def test_should_not_return_labels_when_tag_inside_step(self):
     """ Scenario: no labels when tag inside step"""
     # Arrange
     obj = LabelParser()
     obj.parse("When [email protected]")
     # Act
     result = obj.pop_labels()
     # Assert
     assert result == []
     assert obj._labels == []
Beispiel #7
0
 def test_should_return_labels(self):
     """ Scenario: pop labels """
     # Arrange
     obj = LabelParser()
     obj.parse("@label1")
     # Act
     result = obj.pop_labels()
     # Assert
     assert result == ["label1"]
     assert obj._labels == []
Beispiel #8
0
 def test_should_not_return_labels_when_tag_inside_step(self):
     """ Scenario: no labels when tag inside step"""
     # Arrange
     obj = LabelParser()
     obj.parse('When [email protected]')
     # Act
     result = obj.pop_labels()
     # Assert
     self.assertEqual(result, [])
     self.assertEqual(obj._labels, [])
Beispiel #9
0
 def test_should_return_labels(self):
     """ Scenario: pop labels """
     # Arrange
     obj = LabelParser()
     obj.parse('@label1')
     # Act
     result = obj.pop_labels()
     # Assert
     self.assertEqual(result, ['label1'])
     self.assertEqual(obj._labels, [])