Exemplo n.º 1
0
	def test_that_it_yields_multiple_name_keywords( self ):
		actual = KeywordSet( ["-n","git","commit"] )
		expected = TestKeywordSet( ["git","commit"], [], [], [], [])
		self.assertEqual(actual,expected)
Exemplo n.º 2
0
	def test_that_it_returns_invalid_for_bad_keywords( self ):
		keyword_set = KeywordSet( "aoeu -b -w -s -n -t".split() )
		self.assertEqual(keyword_set.is_valid(), False)
Exemplo n.º 3
0
	def test_that_it_yields_all_expected_keywords_variant( self ):
		actual = KeywordSet( "-b blerv -w -s pineapple moose mouse -n git commit".split() )
		expected = TestKeywordSet( ["git","commit"], ["blerv"], [], [], ["pineapple","moose","mouse"])
		self.assertEqual(actual,expected)
Exemplo n.º 4
0
	def test_that_it_returns_valid_for_good_keywords( self ):
		keyword_set = KeywordSet( "-b blerv -w -s pineapple moose mouse -n git commit".split() )
		self.assertEqual(keyword_set.is_valid(), True)
Exemplo n.º 5
0
	def test_that_it_yields_all_expected_keywords( self ):
		actual = KeywordSet( "-n git commit -w hats -s pineapple moose mouse -t xcode -b blerv".split() )
		expected = TestKeywordSet( ["git","commit"], ["blerv"], ["xcode"], ["hats"], ["pineapple","moose","mouse"])
		self.assertEqual(actual,expected)