Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
skipy mypy test on python 3.6
  • Loading branch information
blink1073 committed Feb 10, 2022
commit 9e91b4a975aafad0b33e749f960d07e706526eec
4 changes: 4 additions & 0 deletions test/test_mypy.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
sample client code that uses PyMongo typings."""

import os
import sys
import unittest
from typing import Any, Dict, Iterable, List

Expand All @@ -42,6 +43,9 @@ def ensure_mypy_fails(self, filename: str) -> None:
self.assertTrue(exit_status, msg=stdout)

def test_mypy_failures(self) -> None:
if sys.version_info[:2] < (3, 7):
raise unittest.SkipTest("Python version >= 3.7 required.")

for filename in get_tests():
with self.subTest(filename=filename):
self.ensure_mypy_fails(filename)
Expand Down