예제 #1
0
 def setUp(self):
     self.origdir = os.getcwd()
     self.tmpdir = tempfile.mkdtemp()
     self.name = gitrelease.name_get()
     self.wdir = pjoin(self.tmpdir, self.name)
     shutil.copytree('.', self.wdir)
     os.chdir(self.wdir)
     null = open('/dev/null', 'w')
     for tag in subprocess.check_output(['git', 'tag'])\
                          .decode('utf-8')\
                          .split('\n'):
         if tag != '':
             subprocess.check_call(['git', 'tag', '-d', tag],
                                   stdout=null)
     null.close()
예제 #2
0
 def test_name_get(self):
     self.assertEqual(gitrelease.name_get(), 'git-release')