Giter VIP home page Giter VIP logo

loofah-1's Introduction

loofah

CircleCI

A tool to list test fixtures declared but not used in a test:

image

This tool is actually a pytest plugin, and with some improved packaging could be installed, and then called via the py.test command line.


Features

  • Uses the pytest collection to get a list of tests and available fixtures
  • Parses the code for each function to determine whether fixture arguments are used or not in the test
  • Supports a list of "ignored" fixtures, since some fixtures are only used to create and tear down a particular context, and might not be used directly in the test code

Installation

You can install loofah via pip:

$ pip install loofah

Usage

Since loofah relies on pytest collecting and being able to execute the tests, it needs to be run from your normal development shell, and probably installed in the venv of your project.

So, from your normal development shell, run loofah as you would run your tests: (ie with any required environment variables or virtual environment enabled, etc)

$ loofah test/unit
...
test/unit/account_tests.py:10 in test_account_update_requires_login detected 1 unused fixture:
    user
test/unit/account_tests.py:28 in test_account_locks_after_three_attempts detected 2 unused fixtures:
    user
    monkeypatch

Why 'loofah' ?

Why name this project after a fruit with fibrous, spongy interior often used to clean hard-to-reach areas of the human body? That's a mystery indeed.

License

Distributed under the terms of the MIT_ license, "loofah" is free and open source software

loofah-1's People

Contributors

steinnes avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.