Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

pylint fixes and version bump for NSFW changes.

  • Loading branch information...
commit 093cf2f6ad1f87a4a9514d3f305130010b6c939d 1 parent 7cfb514
Bryce Boe bboe authored
Showing with 13 additions and 9 deletions.
  1. +1 −1  .pylintrc
  2. +1 −1  praw/__init__.py
  3. +11 −7 praw/tests.py
2  .pylintrc
View
@@ -230,7 +230,7 @@ max-branchs=15
# max-statements=0
# Maximum number of parents for a class (see R0901).
-max-parents=10
+max-parents=15
# Maximum number of attributes for a class (see R0902).
max-attributes=20
2  praw/__init__.py
View
@@ -27,7 +27,7 @@
urljoin)
from praw.settings import CONFIG
-__version__ = '1.0.8'
+__version__ = '1.0.9'
UA_STRING = '%%s PRAW/%s Python/%s %s' % (__version__,
sys.version.split()[0],
platform.platform(True))
18 praw/tests.py
View
@@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License along with
# PRAW. If not, see <http://www.gnu.org/licenses/>.
-# pylint: disable-msg=C0103, R0903, R0904, W0201
+# pylint: disable-msg=C0103, C0302, R0903, R0904, W0201
"""Tests. Split into classes according to what they test."""
@@ -907,24 +907,28 @@ def test_edit_self(self):
self.assertEqual(found.selftext, new_body)
def test_mark_as_nsfw(self):
+ found = None
for item in self.subreddit.get_top():
if not item.over_18:
+ found = item
break
else:
self.fail("Couldn't find a SFW submission")
- item.mark_as_nsfw()
- item.refresh()
- self.assertTrue(item.over_18)
+ found.mark_as_nsfw()
+ found.refresh()
+ self.assertTrue(found.over_18)
def test_unmark_as_nsfw(self):
+ found = None
for item in self.subreddit.get_top():
if item.over_18:
+ found = item
break
else:
self.fail("Couldn't find a NSFW submission")
- item.unmark_as_nsfw()
- item.refresh()
- self.assertFalse(item.over_18)
+ found.unmark_as_nsfw()
+ found.refresh()
+ self.assertFalse(found.over_18)
class SubredditTest(unittest.TestCase, AuthenticatedHelper):
Please sign in to comment.
Something went wrong with that request. Please try again.