Skip to content

Commit

Permalink
Remove unit markers in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alisaifee committed May 29, 2020
1 parent 5ce9256 commit 5dabf60
Show file tree
Hide file tree
Showing 12 changed files with 4 additions and 16 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Expand Up @@ -12,13 +12,13 @@ jobs:
strategy:
matrix:
python-version: [2.7, pypy2, 3.5, 3.7, 3.8, pypy3]
marker: [unit]
marker: [not integration]
include:
- python-version: 2.7
marker: 'integration'
- python-version: 3.7
coverage: true
marker: 'unit,integration'
marker: 'True' # run all tests
steps:
- uses: actions/checkout@v2
- name: Cache dependencies
Expand All @@ -41,7 +41,7 @@ jobs:
make setup-test-backends
- name: Tests
run: |
py.test -m ${{ matrix.marker || 'unit' }}
py.test -m "${{ matrix.marker || 'not integration' }}"
- name: Post Coverage
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion pytest.ini
Expand Up @@ -9,4 +9,4 @@ addopts =
--capture=no
-rfEsxX
--cov=limits
-m unit
-m 'not integration'
1 change: 0 additions & 1 deletion tests/storage/test_gae_memcached.py
Expand Up @@ -12,7 +12,6 @@
from tests import RUN_GAE, fixed_start


@pytest.mark.unit
@unittest.skipUnless(RUN_GAE, reason='Only for GAE')
class GAEMemcachedStorageTests(unittest.TestCase):
def setUp(self):
Expand Down
1 change: 0 additions & 1 deletion tests/storage/test_memcached.py
Expand Up @@ -14,7 +14,6 @@
from tests import fixed_start


@pytest.mark.unit
class MemcachedStorageTests(unittest.TestCase):
def setUp(self):
pymemcache.client.Client(('localhost', 22122)).flush_all()
Expand Down
1 change: 0 additions & 1 deletion tests/storage/test_memory.py
Expand Up @@ -9,7 +9,6 @@
from limits.strategies import FixedWindowRateLimiter, MovingWindowRateLimiter


@pytest.mark.unit
class MemoryStorageTests(unittest.TestCase):
def setUp(self):
self.storage = MemoryStorage()
Expand Down
3 changes: 0 additions & 3 deletions tests/storage/test_redis.py
Expand Up @@ -12,7 +12,6 @@
)


@pytest.mark.unit
class SharedRedisTests(object):
def test_fixed_window(self):
limiter = FixedWindowRateLimiter(self.storage)
Expand Down Expand Up @@ -67,7 +66,6 @@ def test_moving_window_expiry(self):
)


@pytest.mark.unit
class RedisStorageTests(SharedRedisTests, unittest.TestCase):
def setUp(self):
self.storage_url = "redis://localhost:7379"
Expand All @@ -84,7 +82,6 @@ def test_init_options(self):
)


@pytest.mark.unit
class RedisUnixSocketStorageTests(SharedRedisTests, unittest.TestCase):
def setUp(self):
self.storage_url = "redis+unix:///tmp/limits.redis.sock"
Expand Down
1 change: 0 additions & 1 deletion tests/storage/test_redis_cluster.py
Expand Up @@ -8,7 +8,6 @@
from tests.storage.test_redis import SharedRedisTests


@pytest.mark.unit
class RedisClusterStorageTests(SharedRedisTests, unittest.TestCase):
def setUp(self):
rediscluster.RedisCluster("localhost", 7000).flushall()
Expand Down
1 change: 0 additions & 1 deletion tests/test_limit_granularities.py
Expand Up @@ -5,7 +5,6 @@
from limits import limits


@pytest.mark.unit
class GranularityTests(unittest.TestCase):
def test_seconds_value(self):
self.assertEqual(
Expand Down
1 change: 0 additions & 1 deletion tests/test_limits.py
Expand Up @@ -5,7 +5,6 @@
from limits import limits


@pytest.mark.unit
class LimitsTests(unittest.TestCase):
class FakeLimit(limits.RateLimitItem):
granularity = (1, "fake")
Expand Down
1 change: 0 additions & 1 deletion tests/test_ratelimit_parser.py
Expand Up @@ -6,7 +6,6 @@
from limits import limits


@pytest.mark.unit
class RatelimitParserTests(unittest.TestCase):
def test_singles(self):
for rl_string in ["1 per second", "1/SECOND", "1 / Second"]:
Expand Down
1 change: 0 additions & 1 deletion tests/test_storage.py
Expand Up @@ -19,7 +19,6 @@
from tests import RUN_GAE


@pytest.mark.unit
class BaseStorageTests(unittest.TestCase):
def setUp(self):
pymemcache.client.Client(('localhost', 22122)).flush_all()
Expand Down
1 change: 0 additions & 1 deletion tests/test_strategy.py
Expand Up @@ -20,7 +20,6 @@
from tests import skip_if_pypy


@pytest.mark.unit
class WindowTests(unittest.TestCase):
def setUp(self):
pymemcache.client.Client(('localhost', 22122)).flush_all()
Expand Down

0 comments on commit 5dabf60

Please sign in to comment.