Fix errors detected by pyflakes
This commit is contained in:
parent
1f354149a3
commit
ec8047a8c5
@ -74,10 +74,10 @@ class ConfigTest(utils.RepoTestCase):
|
||||
config_write['core.editor'] = 'ed'
|
||||
|
||||
config_read = pygit2.Config(config_filename)
|
||||
self.assertTrue('core.bare' in config_write)
|
||||
self.assertFalse(config_write['core.bare'])
|
||||
self.assertTrue('core.editor' in config_write)
|
||||
self.assertEqual(config_write['core.editor'], 'ed')
|
||||
self.assertTrue('core.bare' in config_read)
|
||||
self.assertFalse(config_read['core.bare'])
|
||||
self.assertTrue('core.editor' in config_read)
|
||||
self.assertEqual(config_read['core.editor'], 'ed')
|
||||
|
||||
def test_add(self):
|
||||
config = pygit2.Config()
|
||||
|
@ -31,7 +31,6 @@ from __future__ import absolute_import
|
||||
from __future__ import unicode_literals
|
||||
import unittest
|
||||
|
||||
import pygit2
|
||||
from . import utils
|
||||
|
||||
__author__ = 'Nico.Geyso@FU-Berlin.de (Nico von Geyso)'
|
||||
|
@ -51,8 +51,8 @@ class ReferencesTest(utils.RepoTestCase):
|
||||
['refs/heads/i18n', 'refs/heads/master'])
|
||||
|
||||
# We add a symbolic reference
|
||||
reference = repo.create_symbolic_reference('refs/tags/version1',
|
||||
'refs/heads/master')
|
||||
repo.create_symbolic_reference('refs/tags/version1',
|
||||
'refs/heads/master')
|
||||
self.assertEqual(sorted(repo.listall_references()),
|
||||
['refs/heads/i18n', 'refs/heads/master',
|
||||
'refs/tags/version1'])
|
||||
|
@ -29,10 +29,8 @@
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import unicode_literals
|
||||
import os
|
||||
import unittest
|
||||
|
||||
import pygit2
|
||||
from . import utils
|
||||
|
||||
|
||||
@ -41,8 +39,9 @@ __author__ = 'carlos@cmartin.tk (Carlos Martín Nieto)'
|
||||
TREE_SHA = '967fce8df97cc71722d3c2a5930ef3e6f1d27b12'
|
||||
|
||||
class TreeBuilderTest(utils.BareRepoTestCase):
|
||||
|
||||
def test_new_empty_treebuilder(self):
|
||||
bld = self.repo.TreeBuilder()
|
||||
self.repo.TreeBuilder()
|
||||
|
||||
def test_noop_treebuilder(self):
|
||||
tree = self.repo[TREE_SHA]
|
||||
@ -65,5 +64,6 @@ class TreeBuilderTest(utils.BareRepoTestCase):
|
||||
result = bld.write()
|
||||
self.assertEqual(tree.oid, result)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
Loading…
x
Reference in New Issue
Block a user