From 111a627e7023c53a86b4a7124c4a50a7cea7f847 Mon Sep 17 00:00:00 2001 From: Hynek Schlawack Date: Tue, 16 Aug 2016 12:35:27 +0200 Subject: [PATCH] Get rid of PY3 constant and codecov badge Sadly, their service grew unreliable. :( --- README.rst | 4 ---- src/attr/_compat.py | 1 - tests/test_make.py | 6 +++--- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/README.rst b/README.rst index c8f33251..7a04d1b1 100644 --- a/README.rst +++ b/README.rst @@ -10,10 +10,6 @@ attrs: Attributes Without Boilerplate :target: https://travis-ci.org/hynek/attrs :alt: CI status -.. image:: https://codecov.io/github/hynek/attrs/coverage.svg?branch=master - :target: https://codecov.io/github/hynek/attrs?branch=master - :alt: Coverage - .. teaser-begin ``attrs`` is the Python package that will bring back the **joy** to **writing classes** by relieving you of the drudgery of implementing object protocols (aka `dunder `_ methods). diff --git a/src/attr/_compat.py b/src/attr/_compat.py index 36f0ef2b..94ab75a8 100644 --- a/src/attr/_compat.py +++ b/src/attr/_compat.py @@ -3,7 +3,6 @@ from __future__ import absolute_import, division, print_function import sys -PY3 = sys.version_info[0] == 3 PY2 = sys.version_info[0] == 2 diff --git a/tests/test_make.py b/tests/test_make.py index ba25f586..df336513 100644 --- a/tests/test_make.py +++ b/tests/test_make.py @@ -10,7 +10,7 @@ from hypothesis import given from hypothesis.strategies import booleans, sampled_from from attr import _config -from attr._compat import PY3 +from attr._compat import PY2 from attr._make import ( Attribute, NOTHING, @@ -157,7 +157,7 @@ class TestAttributes(object): """ Tests for the `attributes` class decorator. """ - @pytest.mark.skipif(PY3, reason="No old-style classes in Py3") + @pytest.mark.skipif(not PY2, reason="No old-style classes in Py3") def test_catches_old_style(self): """ Raises TypeError on old-style classes. @@ -259,7 +259,7 @@ class TestAttributes(object): assert sentinel == getattr(C, method_name) - @pytest.mark.skipif(not PY3, reason="__qualname__ is PY3-only.") + @pytest.mark.skipif(PY2, reason="__qualname__ is PY3-only.") @given(slots_outer=booleans(), slots_inner=booleans()) def test_repr_qualname(self, slots_outer, slots_inner): """