summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorEthan Furman <ethan@stoneleaf.us>2020-09-19 18:12:57 (GMT)
committerGitHub <noreply@github.com>2020-09-19 18:12:57 (GMT)
commitae0d2a33ec05aece939a959d36fcf1df1e210a08 (patch)
treeb6a9ee1fe6ed468717a981a3ff33336ee921fa78 /Lib/test
parent2b05361bf7cbbd76035206fd9befe87f37489f1e (diff)
downloadcpython-ae0d2a33ec05aece939a959d36fcf1df1e210a08.zip
cpython-ae0d2a33ec05aece939a959d36fcf1df1e210a08.tar.gz
cpython-ae0d2a33ec05aece939a959d36fcf1df1e210a08.tar.bz2
bpo-41811: create SortKey members using first given value (GH-22316)
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_pstats.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_pstats.py b/Lib/test/test_pstats.py
index 10559de..4f78b99 100644
--- a/Lib/test/test_pstats.py
+++ b/Lib/test/test_pstats.py
@@ -95,5 +95,9 @@ class StatsTestCase(unittest.TestCase):
self.assertIn('pass2', funcs_called)
self.assertIn('pass3', funcs_called)
+ def test_SortKey_enum(self):
+ self.assertEqual(SortKey.FILENAME, 'filename')
+ self.assertNotEqual(SortKey.FILENAME, SortKey.CALLS)
+
if __name__ == "__main__":
unittest.main()