diff options
| author | Éric Araujo <merwok@netwok.org> | 2020-05-07 14:29:20 -0400 |
|---|---|---|
| committer | Éric Araujo <merwok@netwok.org> | 2020-05-07 14:29:20 -0400 |
| commit | e1be97b3261661af865a0157f755fdc728b9f1f7 (patch) | |
| tree | 6094838c31cf413554a02ea8f56d36c8f6f82f24 /tests | |
| parent | ce6685e1b4a6c240ce9382464b1e0055a33d2b4a (diff) | |
| parent | 1722cbb7bf40ce9d3793faf38f63e9f00d577613 (diff) | |
| download | pyramid-e1be97b3261661af865a0157f755fdc728b9f1f7.tar.gz pyramid-e1be97b3261661af865a0157f755fdc728b9f1f7.tar.bz2 pyramid-e1be97b3261661af865a0157f755fdc728b9f1f7.zip | |
merge master
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_config/test_views.py | 2 | ||||
| -rw-r--r-- | tests/test_i18n.py | 1 | ||||
| -rw-r--r-- | tests/test_integration.py | 1 | ||||
| -rw-r--r-- | tests/test_path.py | 4 | ||||
| -rw-r--r-- | tests/test_scripts/test_pserve.py | 12 | ||||
| -rw-r--r-- | tests/test_traversal.py | 1 | ||||
| -rw-r--r-- | tests/test_util.py | 5 |
7 files changed, 10 insertions, 16 deletions
diff --git a/tests/test_config/test_views.py b/tests/test_config/test_views.py index 6b34f1bd4..2a55ad45d 100644 --- a/tests/test_config/test_views.py +++ b/tests/test_config/test_views.py @@ -3099,7 +3099,7 @@ class TestMultiView(unittest.TestCase): ) mv.add('view5', 100, accept='text/xml') self.assertEqual(mv.media_views['text/xml'], [(100, 'view5', None)]) - self.assertEqual(set(mv.accepts), set(['text/xml', 'text/html'])) + self.assertEqual(set(mv.accepts), {'text/xml', 'text/html'}) self.assertEqual(mv.views, [(99, 'view2', None), (100, 'view', None)]) def test_add_with_phash(self): diff --git a/tests/test_i18n.py b/tests/test_i18n.py index b5500af37..b8b11830e 100644 --- a/tests/test_i18n.py +++ b/tests/test_i18n.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import os import unittest diff --git a/tests/test_integration.py b/tests/test_integration.py index 9a690a8d3..638ddb2c5 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import datetime import gc import locale diff --git a/tests/test_path.py b/tests/test_path.py index 384460fb1..c9cfde2b6 100644 --- a/tests/test_path.py +++ b/tests/test_path.py @@ -101,10 +101,10 @@ class TestCallerPackage(unittest.TestCase): self.assertEqual(result, tests) def test_it_level_3(self): - import unittest + import _pytest result = self._callFUT(3) - self.assertEqual(result, unittest) + self.assertEqual(result, _pytest) def test_it_package(self): import tests diff --git a/tests/test_scripts/test_pserve.py b/tests/test_scripts/test_pserve.py index 2feecf3e0..5e5c28c7b 100644 --- a/tests/test_scripts/test_pserve.py +++ b/tests/test_scripts/test_pserve.py @@ -89,13 +89,11 @@ class TestPServeCommand(unittest.TestCase): self.assertEqual(loader.calls[0]['defaults'], {'a': '1'}) self.assertEqual( inst.watch_files, - set( - [ - os.path.abspath('/base/foo'), - os.path.abspath('/baz'), - os.path.abspath(os.path.join(here, '*.py')), - ] - ), + { + os.path.abspath('/base/foo'), + os.path.abspath('/baz'), + os.path.abspath(os.path.join(here, '*.py')), + }, ) def test_config_file_finds_open_url(self): diff --git a/tests/test_traversal.py b/tests/test_traversal.py index ec61fa5b8..b99862ba0 100644 --- a/tests/test_traversal.py +++ b/tests/test_traversal.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import unittest from urllib.parse import quote diff --git a/tests/test_util.py b/tests/test_util.py index 93493c683..8ed082ee4 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -472,7 +472,7 @@ class Test_object_description(unittest.TestCase): self.assertEqual(self._callFUT(('a', 'b')), "('a', 'b')") def test_set(self): - self.assertEqual(self._callFUT(set(['a'])), "{'a'}") + self.assertEqual(self._callFUT({'a'}), "{'a'}") def test_list(self): self.assertEqual(self._callFUT(['a']), "['a']") @@ -492,8 +492,7 @@ class Test_object_description(unittest.TestCase): def test_method(self): self.assertEqual( self._callFUT(self.test_method), - 'method test_method of class tests.test_util.' - 'Test_object_description', + 'function tests.test_util.test_method', ) def test_class(self): |
