1 --- nose-1.3.7/functional_tests/doc_tests/test_restricted_plugin_options/restricted_plugin_options.rst.orig
2 +++ nose-1.3.7/functional_tests/doc_tests/test_restricted_plugin_options/restricted_plugin_options.rst
4 >>> from nose.plugins.manager import RestrictedPluginManager
5 >>> class StartPlugin(Plugin):
6 ... def startTest(self, test):
7 - ... print "started %s" % test
8 + ... print("started %s" % test)
12 --- nose-1.3.7/functional_tests/test_withid_failures.rst.orig
13 +++ nose-1.3.7/functional_tests/test_withid_failures.rst
15 >>> support = os.path.join(os.path.dirname(__file__), 'support', 'id_fails')
16 >>> argv = [__file__, '-v', '--with-id', '--id-file', idfile, support]
17 >>> run(argv=argv, plugins=[TestId()]) # doctest: +ELLIPSIS
18 - #1 Failure: ImportError (No module ...apackagethatdoesntexist...) ... ERROR
19 + #1 Failure: ModuleNotFoundError (No module named ...apackagethatdoesntexist...) ... ERROR
21 #3 test_b.test_fail ... FAIL
23 ======================================================================
24 - ERROR: Failure: ImportError (No module ...apackagethatdoesntexist...)
25 + ERROR: Failure: ModuleNotFoundError (No module named ...apackagethatdoesntexist...)
26 ----------------------------------------------------------------------
27 Traceback (most recent call last):
29 - ImportError: No module ...apackagethatdoesntexist...
30 + ModuleNotFoundError: No module named ...apackagethatdoesntexist...
32 ======================================================================
33 FAIL: test_b.test_fail
36 >>> _junk = sys.modules.pop('test_a', None) # 2.3 requires
37 >>> run(argv=argv, plugins=[TestId()]) #doctest: +ELLIPSIS
38 - #1 Failure: ImportError (No module ...apackagethatdoesntexist...) ... ERROR
39 + #1 Failure: ModuleNotFoundError (No module named ...apackagethatdoesntexist...) ... ERROR
41 ======================================================================
42 - ERROR: Failure: ImportError (No module ...apackagethatdoesntexist...)
43 + ERROR: Failure: ModuleNotFoundError (No module named ...apackagethatdoesntexist...)
44 ----------------------------------------------------------------------
45 Traceback (most recent call last):
47 - ImportError: No module ...apackagethatdoesntexist...
48 + ModuleNotFoundError: No module named ...apackagethatdoesntexist...
50 ----------------------------------------------------------------------
52 --- nose-1.3.7/functional_tests/doc_tests/test_selector_plugin/selector_plugin.rst.orig
53 +++ nose-1.3.7/functional_tests/doc_tests/test_selector_plugin/selector_plugin.rst
55 package and associated tests, laid out like this::
57 >>> from nose.util import ls_tree
58 - >>> print ls_tree(support)
59 + >>> print(ls_tree(support))
63 --- nose-1.3.7/functional_tests/doc_tests/test_issue145/imported_tests.rst.orig
64 +++ nose-1.3.7/functional_tests/doc_tests/test_issue145/imported_tests.rst
67 >>> support = os.path.join(os.path.dirname(__file__), 'support')
68 >>> from nose.util import ls_tree
69 - >>> print ls_tree(support) # doctest: +REPORT_NDIFF
70 + >>> print(ls_tree(support)) # doctest: +REPORT_NDIFF
74 --- nose-1.3.7/unit_tests/test_doctest_munging.rst.orig
75 +++ nose-1.3.7/unit_tests/test_doctest_munging.rst
77 the example should raise an exception!
79 >>> from nose.plugins.plugintest import remove_stack_traces
80 - >>> print remove_stack_traces("""\
81 + >>> print(remove_stack_traces("""\
82 ... Ceci n'est pas une traceback.
83 ... Traceback (most recent call last):
84 ... File "/some/dir/foomodule.py", line 15, in runTest
85 ... File "/some/dir/spam.py", line 293, in who_knows_what
86 ... AssertionError: something bad happened
89 Ceci n'est pas une traceback.
90 Traceback (most recent call last):
93 Multiple tracebacks in an example are all replaced, as long as they're
94 separated by blank lines.
96 - >>> print remove_stack_traces("""\
97 + >>> print(remove_stack_traces("""\
98 ... Ceci n'est pas une traceback.
99 ... Traceback (most recent call last):
102 ... Traceback (most recent call last):
104 ... AttributeError: spam
107 Ceci n'est pas une traceback.
108 Traceback (most recent call last):
111 trailing blank lines.
113 >>> from nose.plugins.plugintest import munge_nose_output_for_doctest
114 - >>> print munge_nose_output_for_doctest("""\
115 + >>> print(munge_nose_output_for_doctest("""\
116 ... runTest (foomodule.PassingTest) ... ok
117 ... runTest (foomodule.FailingTest) ... FAIL
120 ... FAILED (failures=1)
125 runTest (foomodule.PassingTest) ... ok
126 runTest (foomodule.FailingTest) ... FAIL
128 --- nose-1.3.7/unit_tests/test_config_defaults.rst.orig
129 +++ nose-1.3.7/unit_tests/test_config_defaults.rst
131 >>> from optparse import OptionParser
133 - >>> from cStringIO import StringIO
134 + >>> from io import StringIO
136 >>> import nose.config
139 ... "config_defaults")
142 - ... print "error: %s" % msg
143 + ... print("error: %s" % msg)
145 >>> def get_parser():
146 ... parser = OptionParser()
147 @@ -129,18 +129,18 @@
150 >>> options, args = parse([], os.path.join(support, "nonexistent.cfg"))
151 - >>> print options.__dict__
152 + >>> print(options.__dict__)
157 >>> options, args = parse([], [os.path.join(support, "nonexistent.cfg")])
158 - >>> print options.__dict__
159 + >>> print(options.__dict__)
163 The same goes for missing config file section ("nosetests")
165 >>> options, args = parse([], StringIO("[spam]\nfoo=bar\n"))
166 - >>> print options.__dict__
167 + >>> print(options.__dict__)
169 --- nose-1.3.7/functional_tests/doc_tests/test_init_plugin/init_plugin.rst.orig
170 +++ nose-1.3.7/functional_tests/doc_tests/test_init_plugin/init_plugin.rst
173 ... ConfigurableWidget.cfg = self.cfg
174 ... def load_config(self, path):
175 - ... from ConfigParser import ConfigParser
176 + ... from configparser import ConfigParser
177 ... p = ConfigParser()
179 ... self.cfg = dict(p.items('DEFAULT'))
180 --- nose-1.3.7/functional_tests/doc_tests/test_issue097/plugintest_environment.rst.orig
181 +++ nose-1.3.7/functional_tests/doc_tests/test_issue097/plugintest_environment.rst
185 ... def options(self, parser, env={}):
186 - ... print "env:", env
187 + ... print("env:", env)
189 To test the argv, we use a config class that prints the argv it's
190 given by nose. We need to monkeypatch nose.config.Config, so that we
192 >>> class PrintArgvConfig(old_config):
194 ... def configure(self, argv=None, doc=None):
195 - ... print "argv:", argv
196 + ... print("argv:", argv)
197 ... old_config.configure(self, argv, doc)
198 >>> nose.config.Config = PrintArgvConfig
200 --- nose-1.3.7/unit_tests/test_ls_tree.rst.orig
201 +++ nose-1.3.7/unit_tests/test_ls_tree.rst
203 >>> dir_path = tempfile.mkdtemp()
205 >>> def create_file(filename):
206 - ... fd = os.open(filename, os.O_WRONLY|os.O_CREAT, 0666)
207 + ... fd = os.open(filename, os.O_WRONLY|os.O_CREAT, 0o666)
210 >>> os.mkdir(os.path.join(dir_path, "top"))
212 Note that files matching skip_pattern (by default SVN files,
213 backup files and compiled Python files) are ignored
215 - >>> print ls_tree(os.path.join(dir_path, "top"))
216 + >>> print(ls_tree(os.path.join(dir_path, "top")))
220 --- nose-1.3.7/functional_tests/test_loader.py.orig
221 +++ nose-1.3.7/functional_tests/test_loader.py
223 assert res.errors, "Expected errors but got none"
224 assert not res.failures, res.failures
225 err = res.errors[0][0].test.exc_class
226 - assert err is ImportError, \
227 + assert err is ModuleNotFoundError, \
228 "Expected import error, got %s" % err
230 def test_load_nonsense_name(self):