Skip to content

Testing is OS-Specific (Windows) #7

@doerrie

Description

@doerrie

Description

The ability to run any tests is OS-Specific (Windows)

Steps to reproduce

run python setup.py nosetests on Linux

Expected Behavior

More than one test should execute.

Actual Behavior

A TypeError is raised at tests/tools.py:423 for indexing into None.

Environment

  • Operating System: Ubuntu 20.04
  • Python version (output of python -V): 3.8.5
  • fixedpoint version: commit 0707499 (current master)

1-line Repair:

tests/tools.py:423

        directory = re.search(r'^(.+)\\__init__\.py', frame.filename)[1]

should read:

        directory = os.path.dirname(frame.filename)

This allowed me to execute tests.

If the TypeError being raised for indexing into None was being used to implicitly filter for __init__.py then alter to the following:

        if os.path.basename(frame.filename) != "__init__.py":
                raise TypeError
        directory = os.path.dirname(frame.filename)

I have not tested this code, but it is more likely to be backward compatible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions