diff --git a/mccabe.py b/mccabe.py
index f5ef5d9..72b8bdd 100644
--- a/mccabe.py
+++ b/mccabe.py
@@ -133,6 +133,8 @@ class PathGraphingAstVisitor(ASTVisitor):
             self.graphs["%s%s" % (self.classname, node.name)] = self.graph
             self.reset()
 
+    visitAsyncFunctionDef = visitFunctionDef
+
     def visitClassDef(self, node):
         old_classname = self.classname
         self.classname += node.name + "."
@@ -158,13 +160,13 @@ class PathGraphingAstVisitor(ASTVisitor):
     visitAssert = visitAssign = visitAugAssign = visitDelete = visitPrint = \
         visitRaise = visitYield = visitImport = visitCall = visitSubscript = \
         visitPass = visitContinue = visitBreak = visitGlobal = visitReturn = \
-        visitSimpleStatement
+        visitAwait = visitSimpleStatement
 
     def visitLoop(self, node):
         name = "Loop %d" % node.lineno
         self._subgraph(node, name)
 
-    visitFor = visitWhile = visitLoop
+    visitAsyncFor = visitFor = visitWhile = visitLoop
 
     def visitIf(self, node):
         name = "If %d" % node.lineno
@@ -216,6 +218,8 @@ class PathGraphingAstVisitor(ASTVisitor):
         self.appendPathNode(name)
         self.dispatch_list(node.body)
 
+    visitAsyncWith = visitWith
+
 
 class McCabeChecker(object):
     """McCabe cyclomatic complexity checker."""
diff --git a/setup.cfg b/setup.cfg
index 5e40900..519ba68 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,2 +1,5 @@
 [wheel]
 universal = 1
+
+[aliases]
+test = pytest
diff --git a/setup.py b/setup.py
index fb8b970..bf8d7d7 100644
--- a/setup.py
+++ b/setup.py
@@ -33,7 +33,8 @@ setup(
     license='Expat license',
     py_modules=['mccabe'],
     zip_safe=False,
-    test_suite='test_mccabe',
+    setup_requires=['pytest-runner'],
+    tests_require=['pytest'],
     entry_points={
         'flake8.extension': [
             'C90 = mccabe:McCabeChecker',
diff --git a/tox.ini b/tox.ini
index a472aa4..6e7e690 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,6 +1,6 @@
 [tox]
 envlist =
-    py26,py27,py33,py34,flake8
+    py26,py27,py33,py34,py35,flake8
 
 [testenv]
 deps =

Not working with python 3.5 "async def ..."
It looks like mccabe is ignoring python 3.5 coroutines defined like

```python
async def foobar(a, b, c):
    whatever(a, b, c)
```

I tried it via flake8 version:

    2.5.1 (pep8: 1.7.0, pyflakes: 1.0.0, mccabe: 0.3.1) CPython 3.5.0+ on Linux
diff --git a/test_mccabe.py b/test_mccabe.py
index 07d8d78..44fb565 100644
--- a/test_mccabe.py
+++ b/test_mccabe.py
@@ -5,6 +5,8 @@ try:
 except ImportError:
     from io import StringIO
 
+import pytest
+
 import mccabe
 from mccabe import get_code_complexity
 
@@ -84,6 +86,19 @@ else:
     print(4)
 """
 
+async_keywords = """\
+async def foobar(a, b, c):
+    await whatever(a, b, c)
+    if await b:
+        pass
+
+    async with c:
+        pass
+
+    async for x in a:
+        pass
+"""
+
 
 def get_complexity_number(snippet, strio, max=0):
     """Get the complexity number from the printed string."""
@@ -164,6 +179,13 @@ class McCabeTestCase(unittest.TestCase):
     def test_try_else(self):
         self.assert_complexity(try_else, 4)
 
+    @pytest.mark.skipif(sys.version_info < (3, 5),
+                        reason="Async keywords are only valid on Python 3.5+")
+    def test_async_keywords(self):
+        """Validate that we properly process async keyword usage."""
+        complexity = get_complexity_number(async_keywords, self.strio)
+        self.assertEqual(complexity, 3)
+
 
 class RegressionTests(unittest.TestCase):
     def setUp(self):

pip install -e .
parse_log_pytest
pytest
pytest flake8
apt-get update apt-get install -y gcc
3.9
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
exceptiongroup @ file:///croot/exceptiongroup_1706031385326/work
flake8==7.2.0
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
-e git+https://github.com/PyCQA/mccabe.git@c9bb16e5c66997153e0347ab5a1ee39e7d2a2e76#egg=mccabe
packaging @ file:///croot/packaging_1734472117206/work
pluggy @ file:///croot/pluggy_1733169602837/work
pycodestyle==2.13.0
pyflakes==3.3.1
pytest @ file:///croot/pytest_1738938843180/work
tomli @ file:///opt/conda/conda-bld/tomli_1657175507142/work

name: mccabe
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - exceptiongroup=1.2.0=py39h06a4308_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - packaging=24.2=py39h06a4308_0
  - pip=25.0=py39h06a4308_0
  - pluggy=1.5.0=py39h06a4308_0
  - pytest=8.3.4=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tomli=2.0.1=py39h06a4308_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - flake8==7.2.0
      - pycodestyle==2.13.0
      - pyflakes==3.3.1
prefix: /opt/conda/envs/mccabe

test_mccabe.py::McCabeTestCase::test_async_keywords
test_mccabe.py::McCabeTestCase::test_for_else_snippet test_mccabe.py::McCabeTestCase::test_for_loop_snippet test_mccabe.py::McCabeTestCase::test_if_elif_else_dead_path_snippet test_mccabe.py::McCabeTestCase::test_nested_functions_snippet test_mccabe.py::McCabeTestCase::test_print_message test_mccabe.py::McCabeTestCase::test_recursive_snippet test_mccabe.py::McCabeTestCase::test_sequential_snippet test_mccabe.py::McCabeTestCase::test_sequential_unencapsulated_snippet test_mccabe.py::McCabeTestCase::test_trivial test_mccabe.py::McCabeTestCase::test_try_else test_mccabe.py::RegressionTests::test_max_complexity_is_always_an_int
setup.py tox.ini setup.cfg mccabe.py
setup.py tox.ini setup.cfg mccabe.py