question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

linting and testing virtualenv

See original GitHub issue

Issue Type

  • Bug report

Molecule and Ansible details

[user@host dir]$ pipenv run ansible --version
ansible 2.7.8
  config file = None
  configured module search path = ['/Users/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/user/.local/share/virtualenvs/project_name-F5AQQX11/lib/python3.7/site-packages/ansible
  executable location = /Users/ccuming/.local/share/virtualenvs/project_name-F5AQQX11/bin/ansible
  python version = 3.7.2 (default, Feb 12 2019, 08:15:36) [Clang 10.0.0 (clang-1000.11.45.5)]
[user@host dir]$ pipenv run molecule --version
molecule, version 2.19.0

Molecule installation method (one of):

  • pipenv

Ansible installation method (one of):

  • pipenv

Detail any linters or test runners used:

Desired Behavior

when i run molecule tests, i’d like the virtualenv’s packages (ansible and molecule) to not be scanned.

Actual Behaviour

when i run molecule tests, the virtualenv packages are being scanned via flake8 and testinfra.

Include a minimum complete verifiable example with output of running molecule --debug.

Pipfile

[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]

[packages]
ansible = "*"
molecule = "*"
docker-py = "*"

[requires]
python_version = "3.7"

molcule_debug.log

i tried passing exclude=*/virtualenvs/* to flake8, but that didn’t quite get it. is there something else i can try?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
decentral1secommented, May 14, 2019

i’m not stepping into that flame war

You’ve already put one foot in the door … good luck!

0reactions
ssbarneacommented, Sep 15, 2019

This seems as an unsupported use-case so I will be closing. Still, if you find a way to avoid it, you are welcomed to make a PR.

Read more comments on GitHub >

github_iconTop Results From Across the Web

linting and testing virtualenv - ansible-community/molecule
when i run molecule tests, the virtualenv packages are being scanned via flake8 and testinfra. Include a minimum complete verifiable example ...
Read more >
How Unit Testing, Linting, and Continuous Integration in ...
These three requirements can be addressed via three tools: unit testing, linting, and continuous integration. With these three tools you can ...
Read more >
Managing a Project's Virtualenvs with tox | seanh.cc
Tox is a project virtualenv management and development task ... to run the tests followed by the linter, and Tox creates a virtualenv, ......
Read more >
Development — virtualenv 20.0.5.dev10+g50ddc3c ...
The sections below will help you get started with development, testing, ... virtualenv uses pre-commit for managing linting of the codebase. pre-commit ...
Read more >
Using Python environments in VS Code
If you are creating an environment using Venv, the command presents a list of interpreters that can be used as a base for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found