Skip to content

Invoking --plots through PyCharm gives error #16

Open
@drasmuss

Description

@drasmuss

I haven't done any digging into why this is, just noting it down for future work. When you run tests through PyCharm, they get invoked with something like this command:

python.exe "C:\Program Files\JetBrains\PyCharm Community Edition 2019.1.2\helpers\pycharm\_jb_pytest_runner.py" --target test_simulator.py::test_train_recurrent -- --plots

Something about this confuses the way we parse the dirname:

...\lib\site-packages\pytest_plt\plugin.py:80: in __init__
    self.dirname = dirname
...\lib\site-packages\pytest_plt\plugin.py:96: in dirname
    os.makedirs(_dirname)

OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: 'test_simulator.py::test_train_recurrent'

This isn't a new problem, the same issue was present with the plt fixture in nengo core.

Although it's kind of an edge case, it'd be nice to get this working since a) PyCharm is a not-uncommon IDE, and b) it's possible this same problem could be triggered in other ways when pytest is invoked in a "non-standard" way.

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