def test_should_not_return_labels(self): """ Scenario: no labels """ # Arrange obj = LabelParser() # Act result = obj.pop_labels() # Assert self.assertEqual(result, [])
def test_should_not_return_labels(self): """ Scenario: no labels """ # Arrange obj = LabelParser() # Act result = obj.pop_labels() # Assert assert result == []
def test_should_return_true_if_line_with_labels(self): """ Scenario: line with labels """ # Arrange obj = LabelParser() line = '@label1' # Act result = obj.parse(line) # Assert self.assertTrue(result)
def test_should_return_false_if_line_without_labels(self): """ Scenario: line without labels """ # Arrange obj = LabelParser() line = '' # Act result = obj.parse(line) # Assert self.assertFalse(result)
def test_should_return_false_if_line_without_labels(self): """ Scenario: line without labels """ # Arrange obj = LabelParser() line = "" # Act result = obj.parse(line) # Assert assert not result
def test_should_return_true_if_line_with_labels(self): """ Scenario: line with labels """ # Arrange obj = LabelParser() line = "@label1" # Act result = obj.parse(line) # Assert assert result
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, [])
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 == []
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 == []
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, [])