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