Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

Commit

Permalink
Fix deprecation warnings
Browse files Browse the repository at this point in the history
- UserWarning: [pep8] section is deprecated. Use [pycodestyle].
- DeprecationWarning: Please use assertTrue instead.
  • Loading branch information
sharkykh committed May 1, 2019
1 parent 93e388f commit 41253ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ ignore =
[flake8]
ignore = E111,E124,E126,E221,E501

[pep8]
[pycodestyle]
ignore = E111,E124,E126,E221,E501
max-line-length = 100
6 changes: 3 additions & 3 deletions tests/test_filecache.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class FileCacheTest(unittest.TestCase):
def testInit(self):
"""Test the twitter._FileCache constructor"""
cache = twitter._FileCache()
self.assert_(cache is not None, 'cache is None')
self.assertTrue(cache is not None, 'cache is None')

def testSet(self):
"""Test the twitter._FileCache.Set method"""
Expand Down Expand Up @@ -38,6 +38,6 @@ def testGetCachedTime(self):
cache.Set("foo", 'Hello World!')
cached_time = cache.GetCachedTime("foo")
delta = cached_time - now
self.assert_(delta <= 1,
'Cached time differs from clock time by more than 1 second.')
self.assertTrue(delta <= 1,
'Cached time differs from clock time by more than 1 second.')
cache.Remove("foo")

0 comments on commit 41253ba

Please sign in to comment.