Message6044
Hi Anthony:
In message <489608269.20171025170504@inbox.ru>,
Anthony writes:
>I have a question about test case failure. Why do test expect relative
>path but not absolute?
>
>test.test_cgi.FormTestCase testMethod=testserve_static_files>
>
> def testserve_static_files(self):
> ...
>
> # TEMPLATES dir is searched by default. So this file exists.
> # Check the returned values.
> cl.serve_static_file("issue.index.html")
> self.assertEquals(output[0][1], "text/html")
>> self.assertEquals(output[0][3], "_test_cgi_form/html/issue.index.html")
>E AssertionError: '/devel/hibcore/src/test/_test_cgi_form/html/issue.index.html' !=
>'_test_cgi_form/html/issue.index.html'
>
>test_cgi.py:1411: AssertionError
How did you generate this error? Running:
./run_tests.py -k testserve_static_files test/test_cgi.py
$PWD/run_tests.py -k testserve_static_files test/test_cgi.py
$PWD/roundup/run_tests.py -k testserve_static_files roundup/test/test_cgi.py
and
./run_tests.py -k testserve_static_files $PWD/test/test_cgi.py
all work as expected for me. They generate paths relative to the
current working directory where the test directory is generated.
I expect the relative paths to be repeatable while an absolute path
would not repeatable (it would depend on the absolute location of the
directory where the test was run). |
|
Date |
User |
Action |
Args |
2017-10-26 00:50:45 | rouilj | set | recipients:
+ rouilj, antmail |
2017-10-26 00:50:45 | rouilj | link | issue2550956 messages |
2017-10-26 00:50:44 | rouilj | create | |
|