Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows fix for inspect tests #45725

Closed
tiran opened this issue Nov 4, 2007 · 6 comments
Closed

Windows fix for inspect tests #45725

tiran opened this issue Nov 4, 2007 · 6 comments

Comments

@tiran
Copy link
Member

tiran commented Nov 4, 2007

BPO 1384
Nosy @gvanrossum, @amauryfa, @tiran
Files
  • py3k_inspect.patch
  • py3k_inspect_2.diff
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2007-11-06.11:45:36.759>
    created_at = <Date 2007-11-04.18:44:55.956>
    labels = ['OS-windows']
    title = 'Windows fix for inspect tests'
    updated_at = <Date 2008-01-06.22:29:45.399>
    user = 'https://github.com/tiran'

    bugs.python.org fields:

    activity = <Date 2008-01-06.22:29:45.399>
    actor = 'admin'
    assignee = 'none'
    closed = True
    closed_date = <Date 2007-11-06.11:45:36.759>
    closer = 'christian.heimes'
    components = ['Windows']
    creation = <Date 2007-11-04.18:44:55.956>
    creator = 'christian.heimes'
    dependencies = []
    files = ['8688', '8700']
    hgrepos = []
    issue_num = 1384
    keywords = ['patch']
    message_count = 6.0
    messages = ['57105', '57139', '57145', '57146', '57150', '57159']
    nosy_count = 3.0
    nosy_names = ['gvanrossum', 'amaury.forgeotdarc', 'christian.heimes']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue1384'
    versions = ['Python 3.0']

    @tiran
    Copy link
    Member Author

    tiran commented Nov 4, 2007

    The patch lower()s the file names on Windows. The tests break on my
    system because C:\\... != c:\\...

    @gvanrossum
    Copy link
    Member

    Shouldn't this use os.path.normcase() instead of testing for nt and
    using lower()?

    @amauryfa
    Copy link
    Member

    amauryfa commented Nov 5, 2007

    A slightly modified patch, which uses os.path.normcase before comparing
    file names.

    @tiran
    Copy link
    Member Author

    tiran commented Nov 6, 2007

    Ah, os.path has a method for the job. I should have checked the module
    before reinventing the wheel ...

    For some unknown and mysterious reasons the inspect tests are passing
    again on my machine. I've purged the pyc files before I run the
    unpatched test suite. Should I apply the patch anyway?

    @amauryfa
    Copy link
    Member

    amauryfa commented Nov 6, 2007

    Yes, the patch is needed.
    The problem arises when you run the python executable in different ways
    WITHOUT deleting the .pyc files.

    Example on my machine: Note that the exact path to run python is not the
    same:

    cd C:\dev\python\py3k\PCbuild8
    del /s ..\*.pyc
    c:\dev\python\py3k\PCbuild8\win32debug\python_d.exe -E -tt
    ../lib/test/regrtest.py -v test_inspect
    [test OK]
    C:\dev\python\py3k\PCbuild8\win32debug\python_d.exe -E -tt
    ../lib/test/regrtest.py -v test_inspect
    [test FAILED]

    If I always use the same path the tests succeed.

    @tiran
    Copy link
    Member Author

    tiran commented Nov 6, 2007

    Applied to py3k in r58875. I'm doing a svnmerge later. Thanks again for
    your help, pal!

    @tiran tiran closed this as completed Nov 6, 2007
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants