<s> from unittest import TestCase <EOL> import logging <EOL> import six <EOL> from repositorytools import LocalArtifact <EOL> class ArtifactTest ( TestCase ) : <EOL> def setUp ( self ) : <EOL> logging . basicConfig ( level = logging . DEBUG ) <EOL> def test_detect_name_and_version ( self ) : <EOL> artifacts = { <EOL> '<STR_LIT>' : ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> '<STR_LIT>' : ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> '<STR_LIT>' : ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> '<STR_LIT>' : ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> } <EOL> for local_path , namever in six . iteritems ( artifacts ) : <EOL> expected_name , expected_version = namever <EOL> local_artifact = LocalArtifact ( '<STR_LIT>' , local_path = local_path ) <EOL> self . assertEqual ( expected_name , local_artifact . artifact ) <EOL> self . assertEqual ( expected_version , local_artifact . version ) </s>
