[issue4951] failure in test_httpservers

2009-04-25 Thread Walter Dörwald

Walter Dörwald wal...@livinglogic.de added the comment:

There's an EnvironmentVarGuard context manager in support.py that IMHO
should be used for recording changes to the environment variables. Or a
new context manager that does what your patch does could be put into
support.py. There might be other tests that benefit from that.

--
nosy: +doerwalter

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4951
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4951] failure in test_httpservers

2009-04-25 Thread Walter Dörwald

Walter Dörwald wal...@livinglogic.de added the comment:

Hmm, EnvironmentVarGuard seems to be broken:

import os
from test import support

with support.EnvironmentVarGuard() as env:
   env.unset(HOME)
   env.set(HOME, bar)

print(os.environ.get(HOME))

I would have expected that to print the original HOME variable. I'm
going to open a new bug report for that.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4951
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4951] failure in test_httpservers

2009-04-25 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

EnvironmentVarGuard certainly looks like a good thing to use here, 
provided that it works...

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4951
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4951] failure in test_httpservers

2009-04-25 Thread Tarek Ziadé

Tarek Ziadé ziade.ta...@gmail.com added the comment:

Applied in r71878 and r71879. Thanks

EnvironmentVarGuard is definitely the way to go, I'll use it.

--
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4951
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4951] failure in test_httpservers

2009-04-24 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

This looks like an interaction with test_distutils.  On OS X 10.5.6 I get:

Macintosh-4:py3k dickinsm$ ./python.exe Lib/test/regrtest.py test_distutils 
test_httpservers
test_distutils
test_httpservers
Traceback (most recent call last):
  File 
/private/var/folders/nL/nLe5s1a2G807X4++Ih2+yTI/-Tmp-/tmpXvtrLE/cgi-bin/file2.py,
 line 2, in module
import cgi
  File /Users/dickinsm/svn/python/py3k/Lib/cgi.py, line 34, in module
from operator import attrgetter
ImportError: No module named operator
test test_httpservers failed -- Traceback (most recent call last):
  File /Users/dickinsm/svn/python/py3k/Lib/test/test_httpservers.py, line 
370, in test_post
self.assertEquals(res.read(), b'1, python, 123456\n')
AssertionError: b'' != b'1, python, 123456\n'

1 test OK.
1 test failed:
test_httpservers

But if I run test_httpservers by itself all tests pass.

Adding Tarek to the nosy list, in case he knows anything that might help.

--
nosy: +marketdickinson, tarek

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4951
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4951] failure in test_httpservers

2009-04-24 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Here's the verbose test output:

Macintosh-4:py3k dickinsm$ ./python.exe Lib/test/regrtest.py -v test_distutils 
test_httpservers
test_distutils
test_formats (distutils.tests.test_bdist.BuildTestCase) ... ok
test_simple_built (distutils.tests.test_bdist_dumb.BuildDumbTestCase) ... ok
test_no_optimize_flag (distutils.tests.test_bdist_rpm.BuildRpmTestCase) ... ok
test_quiet (distutils.tests.test_bdist_rpm.BuildRpmTestCase) ... ok
test_get_exe_bytes (distutils.tests.test_bdist_wininst.BuildWinInstTestCase) 
... ok
test_build_ext (distutils.tests.test_build_ext.BuildExtTestCase) ... ok
test_optional_extension (distutils.tests.test_build_ext.BuildExtTestCase) ... ok
test_solaris_enable_shared (distutils.tests.test_build_ext.BuildExtTestCase) 
... ok
test_user_site (distutils.tests.test_build_ext.BuildExtTestCase) ... ok
test_empty_package_dir (distutils.tests.test_build_py.BuildPyTestCase) ... ok
test_package_data (distutils.tests.test_build_py.BuildPyTestCase) ... ok
test_build (distutils.tests.test_build_scripts.BuildScriptsTestCase) ... ok
test_default_settings (distutils.tests.test_build_scripts.BuildScriptsTestCase) 
... ok
test_version_int (distutils.tests.test_build_scripts.BuildScriptsTestCase) ... 
ok
test_check_all (distutils.tests.test_check.CheckTestCase) ... ok
test_check_document (distutils.tests.test_check.CheckTestCase) ... ok
test_check_metadata (distutils.tests.test_check.CheckTestCase) ... ok
test_check_restructuredtext (distutils.tests.test_check.CheckTestCase) ... ok
test_simple_run (distutils.tests.test_clean.cleanTestCase) ... ok
test_dump_options (distutils.tests.test_cmd.CommandTestCase) ... ok
test_ensure_dirname (distutils.tests.test_cmd.CommandTestCase) ... ok
test_ensure_filename (distutils.tests.test_cmd.CommandTestCase) ... ok
test_ensure_string (distutils.tests.test_cmd.CommandTestCase) ... ok
test_ensure_string_list (distutils.tests.test_cmd.CommandTestCase) ... ok
test_make_file (distutils.tests.test_cmd.CommandTestCase) ... ok
test_server_empty_registration 
(distutils.tests.test_config.PyPIRCCommandTestCase) ... ok
test_server_registration (distutils.tests.test_config.PyPIRCCommandTestCase) 
... ok
test_clean (distutils.tests.test_config_cmd.ConfigTestCase) ... ok
test_dump_file (distutils.tests.test_config_cmd.ConfigTestCase) ... ok
test_finalize_options (distutils.tests.test_config_cmd.ConfigTestCase) ... ok
test_search_cpp (distutils.tests.test_config_cmd.ConfigTestCase) ... ok
test_run_setup_provides_file (distutils.tests.test_core.CoreTestCase) ... ok
test_run_setup_uses_current_dir (distutils.tests.test_core.CoreTestCase) ... ok
test_copy_tree_verbosity (distutils.tests.test_dir_util.DirUtilTestCase) ... ok
test_create_tree_verbosity (distutils.tests.test_dir_util.DirUtilTestCase) ... 
ok
test_mkpath_remove_tree_verbosity 
(distutils.tests.test_dir_util.DirUtilTestCase) ... ok
test_command_packages_cmdline (distutils.tests.test_dist.DistributionTestCase) 
... ok
test_command_packages_configfile 
(distutils.tests.test_dist.DistributionTestCase) ... ok
test_command_packages_unspecified 
(distutils.tests.test_dist.DistributionTestCase) ... ok
test_empty_options (distutils.tests.test_dist.DistributionTestCase) ... ok
test_custom_pydistutils (distutils.tests.test_dist.MetadataTestCase) ... ok
test_obsoletes (distutils.tests.test_dist.MetadataTestCase) ... ok
test_obsoletes_illegal (distutils.tests.test_dist.MetadataTestCase) ... ok
test_provides (distutils.tests.test_dist.MetadataTestCase) ... ok
test_provides_illegal (distutils.tests.test_dist.MetadataTestCase) ... ok
test_requires (distutils.tests.test_dist.MetadataTestCase) ... ok
test_requires_illegal (distutils.tests.test_dist.MetadataTestCase) ... ok
test_simple_metadata (distutils.tests.test_dist.MetadataTestCase) ... ok
test_move_file_verbosity (distutils.tests.test_file_util.FileUtilTestCase) ... 
ok
test_glob_to_re (distutils.tests.test_filelist.FileListTestCase) ... ok
test_home_installation_scheme (distutils.tests.test_install.InstallTestCase) 
... ok
test_user_site (distutils.tests.test_install.InstallTestCase) ... ok
test_simple_run (distutils.tests.test_install_data.InstallDataTestCase) ... ok
test_simple_run (distutils.tests.test_install_headers.InstallHeadersTestCase) 
... ok
test_default_settings 
(distutils.tests.test_install_scripts.InstallScriptsTestCase) ... ok
test_installation (distutils.tests.test_install_scripts.InstallScriptsTestCase) 
... ok
test_no_compiler (distutils.tests.test_msvc9compiler.msvc9compilerTestCase) ... 
ok
test_reg_class (distutils.tests.test_msvc9compiler.msvc9compilerTestCase) ... ok
test_create_pypirc (distutils.tests.test_register.registerTestCase) ... ok
test_password_not_in_file (distutils.tests.test_register.registerTestCase) ... 
ok
test_password_reset (distutils.tests.test_register.registerTestCase) ... ok
test_registering (distutils.tests.test_register.registerTestCase) ... ok
test_server_empty_registration 

[issue4951] failure in test_httpservers

2009-04-24 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

On my machine, the failure seems to come down to this:

Macintosh-4:py3k dickinsm$ MACOSX_DEPLOYMENT_TARGET=10.4 ./python.exe
Python 3.1a2+ (py3k:71845M, Apr 24 2009, 19:51:44) 
[GCC 4.0.1 (Apple Inc. build 5490)] on darwin
Type help, copyright, credits or license for more information.
 import operator
Traceback (most recent call last):
  File stdin, line 1, in module
ImportError: No module named operator

test_distutils (specifically, test_get_platform in 
Lib/distutils/tests/test_util.py) sets the MACOSX_DEPLOYMENT_TARGET
environment variable to 10.4;  apparently this affects the 'import 
operator' in test_httpservers.  I've no idea why.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4951
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4951] failure in test_httpservers

2009-04-24 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Okay, I think I've got this figured out.  It's a problem in the distutils 
tests: the mechanism for saving and restoring environment variables in

Lib/distutils/tests/test_util.py

doesn't work:  after the line

self.environ = os.environ

in the setUp method, self.environ and os.environ refer to the same object, 
so restoring using os.environ = self.environ doesn't do anything.

The attached patch (against py3k) fixes the problem for me;  trunk also 
appears to have this bug.

Assigning to Tarek.

--
assignee:  - tarek
keywords: +patch
stage:  - patch review
versions: +Python 2.7
Added file: http://bugs.python.org/file13761/issue4951.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4951
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4951] failure in test_httpservers

2009-03-31 Thread Ned Deily

Ned Deily n...@acm.org added the comment:

Also seeing on OS X.  Without having looked at the code yet, I wonder if 
this might be related to Issue1711605.

--
nosy: +nad

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4951
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4951] failure in test_httpservers

2009-03-15 Thread Ger Luijten

Ger Luijten gcjm.luij...@gmail.com added the comment:

Reported Issue 5494 Failure in test_httpservers on Linux with other
error message. Maybe there is a relation, maybe not.
Greetings, Ger

--
nosy: +gerluijten

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4951
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4951] failure in test_httpservers

2009-01-14 Thread Antoine Pitrou

New submission from Antoine Pitrou pit...@free.fr:

This one seems to pop up rather frequently on the buildbots:


==
FAIL: test_post (test.test_httpservers.CGIHTTPServerTestCase)
--
Traceback (most recent call last):
  File
E:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_httpservers.py,
line 330, in test_post
self.assertEquals(res.read(), b'1, python, 123456\n')
AssertionError: b'' != b'1, python, 123456\n'

--

--
components: Library (Lib), Tests
messages: 79881
nosy: pitrou
priority: high
severity: normal
status: open
title: failure in test_httpservers
type: behavior
versions: Python 3.1

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4951
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com