summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Merickel <michael@merickel.org>2020-05-07 01:16:23 -0500
committerGitHub <noreply@github.com>2020-05-07 01:16:23 -0500
commit1722cbb7bf40ce9d3793faf38f63e9f00d577613 (patch)
tree598d3ab2a98e37b6285b7995ef58ccbf7d2b3435 /tests
parent6d52dd4123c1585dd14a628a8789904fd2f5842f (diff)
parent26308141eb87300ad49134b977692ebcf50e66c7 (diff)
downloadpyramid-1722cbb7bf40ce9d3793faf38f63e9f00d577613.tar.gz
pyramid-1722cbb7bf40ce9d3793faf38f63e9f00d577613.tar.bz2
pyramid-1722cbb7bf40ce9d3793faf38f63e9f00d577613.zip
Merge pull request #3582 from Pylons/pyupgrade
Some additional Py3 only cleanups
Diffstat (limited to 'tests')
-rw-r--r--tests/test_config/test_views.py2
-rw-r--r--tests/test_i18n.py1
-rw-r--r--tests/test_integration.py1
-rw-r--r--tests/test_scripts/test_pserve.py12
-rw-r--r--tests/test_traversal.py1
-rw-r--r--tests/test_util.py2
6 files changed, 7 insertions, 12 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_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 f79cdeb85..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']")