From e95a5c85e68324f4536ec4a9c8f840c6e6d5b1b5 Mon Sep 17 00:00:00 2001 From: cytolentino Date: Sun, 11 Nov 2018 12:24:17 +0000 Subject: [PATCH] Add regression test for check_requires_python with no package metadata --- news/D2AC769D-14BC-4DB1-A6D0-303C4E0B2BD5.trivial | 0 tests/unit/test_utils.py | 7 +++++++ 2 files changed, 7 insertions(+) create mode 100644 news/D2AC769D-14BC-4DB1-A6D0-303C4E0B2BD5.trivial diff --git a/news/D2AC769D-14BC-4DB1-A6D0-303C4E0B2BD5.trivial b/news/D2AC769D-14BC-4DB1-A6D0-303C4E0B2BD5.trivial new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/unit/test_utils.py b/tests/unit/test_utils.py index 2c200dbd60f..02feee195f7 100644 --- a/tests/unit/test_utils.py +++ b/tests/unit/test_utils.py @@ -603,6 +603,13 @@ def test_check_requires(self, metadata, should_raise): else: check_dist_requires_python(fake_dist) + def test_no_metadata(self): + fake_dist = Mock( + has_metadata=lambda _: False, + location="foo" + ) + check_dist_requires_python(fake_dist) + class TestGetProg(object):