"does it make sense to install my python unit tests in site-packages?" Code Answer
Answers related to “does it make sense to install my python unit tests in site-packages?”
- How do I write unit tests in PHP with a procedural codebase?
- How to decouple my data layer better and restrict the scope of my unit tests?
- How to install packages offline?
- How do I find the location of my Python site-packages directory?
- How do you generate dynamic (parameterized) unit tests in Python?
- What does “DAMP not DRY” mean when talking about unit tests?
- In Django - Model Inheritance - Does it allow you to override a parent model's attribute?
- Python unit test with base and sub class
- Is it bad practice to have more than one assertion in a unit test? [closed]
- Does it make any sense to use inline keyword with templates?
- What's the difference between dist-packages and site-packages?
- Does it make sense to use “as” instead of a cast even if there is no null check? [closed]
- Logging, Aspect Oriented Programming, and Dependency Injection - Trying to make sense of it all
- How to install Python packages from the tar.gz file without using pip install
- changing order of unit tests in Python
- Is it still necessary to install CUDA before using the conda tensorflow-gpu package?
- How to skip the rest of tests in the class if one has failed?
- How can I use Homebrew to install both Python 2 and 3 on Mac?
- Does it make any sense to use the LFENCE instruction on x86/x86_64 processors?
- How to supply stdin, files and environment variable inputs to Python unit tests?
- Django's self.client.login(…) does not work in unit tests
- Does it make sense to minify code used in NodeJS?
- Is it safe to use the python word “type” in my code?
- Can't install mysql-python (newer versions) in Windows
- Does it make sense to jQuery cache $(this)?
- How can I disable logging while running unit tests in Python Django?
- How to do TDD and unit testing in powershell?
- Entity Framework 4: Does it make sense to create a single diagram for all entities?
- How to mock dependencies for unit tests with ES6 Modules
- Does it make sense to define a struct with a reference type member?
- Does it still make sense to use HTML comments on blocks of JavaScript?
- Does it make sense for unary operators to be associative?
- Xamarin (Android) Unit Tests in Visual Studio 2017
- How do you know what to test when writing unit tests? [closed]
- Do you put unit tests in same project or another project?
- Assert that a method was called in a Python unit test
- Does it still make sense to learn low level WinAPI programming? [closed]
- Python, unit test - Pass command line arguments to setUp of unittest.TestCase
- Why does visual studio 2012 not find my tests?
- Does it make sense to store JWT in a database? [closed]
- Display python unittest results in nice, tabular form [closed]
- How to write a custom `.assertFoo()` method in Python?
- Better way to mock class attribute in python unit test
- How to execute JUnit and TestNG tests in same project using maven-surefire-plugin?
- How to install the Python development headers on Mac OS X?
- Persist variable changes between tests in unittest?
- Unable to install.packages(): system call failed: Cannot allocate memory; installation of package had non-zero exit...
- Class not found: Empty test suite when running unit tests in Android Studio
- When is it appropriate to bypass encapsulation in unit tests?
- How to install packages with pip in Windows PowerShell
- Does it make sense to spawn more than one thread per processor?
- Unit Testing - Is it bad form to have unit test calling other unit tests
- python: Interplay between lib/site-packages/site.py and lib/site.py
- How to run a Python file not in directory from another Python file?
- How to read/make sense of a PHP serialised data string in python
- Does it make any sense to use `baseline` value with `justify-content`, `justify-items` or `justify-self` in CSS...
- Configuring Python to use additional locations for site-packages
- How to run and debug unit tests for an iPhone application
- Test discovery failure when tests in different directories are called the same
- How to write unit tests in plain C?
- Does it make sense to use move semantics for operator+ and/or operator+=?
- Run all unit tests in Android Studio
- Does it make sense to have two packages in the same directory?
- How to list all python virtual environments in Linux?
- How to install a python library manually
- How to handle unit tests in F#?
- Hide stderr output in unit tests
- How to install the Python package pyrouge on Microsoft Windows?
- Does it make sense to provide non-const reference getter
- Kotlin: Make an internal function visible for unit tests
- Python Embeddable Zip File Doesn't Include lib/site-packages in sys.path
- How to install and use additional voices in SpeechSynthesizer()?
- Python unit tests run function after all test
- How to check if python unit test started in PyCharm or not?
- Comparison of multi-line strings in Python unit test
- Does it make sense to make std::map key const?
- Argparse unit tests: Suppress the help message
- What code can I use to check if Python is running in IDLE?
- Does it make sense to integrate backbone.js with ASPNET MVC?
- Does it Make Sense to have ViewModels in the Webapi?
- Create and import helper functions in tests without creating packages in test directory using py.test
- How to install a Python module via its setup.py in Windows? [closed]
- assertAlmostEqual in Python unit-test for collections of floats
- Using Cython with Django. Does it make sense?
- GCC-4.2 error on Mac OSX Mountain Lion, unable to install mysql-python
- Modifying a virtualenv so that packages installed in global site-packages are available
- Ubuntu + virtualenv = a mess? virtualenv hates dist-packages, wants site-packages
- Python unittest - Ran 0 tests in 0.000s
- How to exclude Projects with names ending in “.Test” from my code coverage analysis in VS2012 Unit Tests
- How do I write unit tests to make sure my date/time based code works for all time zones and with/out DST?
- How does the list comprehension to flatten a python list work?
- Including global package into a virtualenv that has been created with --no-site-packages
- Does it make sense to use Hungarian notation prefixes in interpreted languages? [closed]
- Creating a secondary site-packages directory (and loading packages from .pth files therein)
- Why does it make sense to give definition for a pure virtual function?
- Does it ever make sense to make a fundamental (non-pointer) parameter const?
- Python unit test coverage for multiple modules
- When does it make sense to abandon MVVM?
- Using mock to patch a celery task in Django unit tests
- Go: how to run tests for multiple packages?
- Why does it make sense to use asynchronous clients for Redis?
- CDI on Tomcat 7 - does it make sense?
- scala forall and exists output , does it make sense
- Getting nose to ignore a function with 'test' in the name
- How to include unit tests in a ruby module?
- How to run unit tests with “pip install”?
- How to check if value is nan in unittest?
- virtualenv --system-site-packages not using system site packages
- Does it ever make sense to call [init] outside of [[alloc] init]?
- How to run subset of unit tests in CPPUnit by selecting them at run-time?
- How to benchmark unit tests in Python without adding any code
- What are site-packages in python and can you install/use them if you aren't root?
- Where to put shared code for tests in a Go package?
- Psycopg2 fails to install on python 3 with pip issuing a fatal error
- How to turn off Velocity unit testing in Meteor?
- Make unit tests with dates pass in all time zones and with/out DST
- How to use TextTestRunner class from Python unittest module in failfast mode?
- “Does not make sense to draw an image” - Warning after upgrade to MountainLion
- I want to use EBImage package but it says it is not available for my version of R
- How to install MySQL-python by pip?
- AutoFixture in F# UnitTest Project Not Displaying Unit Tests in Test Explorer
- Mock a class and a class method in python unit tests
- Selenium unit tests in Python — where is my log file?
- Does it make sense to reuse destructor logic by using std::swap in a move assignment operator?
- Does it make sense to use .apply( ) and pass the same instance as context?
- Remotely debug unit tests in Netbeans / Maven
- How do I get Visual Express 2010 to find my python.h header file?
- What approach(es) have you used for lightweight Python unit-tests on App Engine?
- Explain the “setUp” and “tearDown” Python methods used in test cases
- Does it make sense to do “try-finally” without “catch”?
- What numbers can you pass as verbosity in running Python Unit Test Suites?
- How to install Anaconda python for all users?
- How to supply a mock class method for python unit test?
- How I can make apt-get install to my virtualenv?
- Does it make sense to use Google Web Toolkit (GWT) as a full-blown Java web framework?
- Xcode 9 - Could not attach to pid for Frameworks unit tests
- Running unit tests with Nose inside a Python environment such as Autodesk Maya?
- Does it make sense to define a final String in Java?
- DisconnectedContext error when running Unit Tests in debug in VS2015
- Where are the AMQP 1.0 implementations? Would it make sense to wait?
- Is it good practice to depend on python's with…as statement
- Does it make sense to build pure JavaScript based web applications (both client and server side)? [closed]
- Python unit test that uses an external data file
- How to keep Unit tests and Integrations tests separate in pytest
- Is it best practice to test my Web API controllers directly or through an HTTP client?
- Generating py.test tests in Python
- Does it make any sense to define “pure” virtual functions in the base class itself?
- Is creating unit tests in a separate project the correct approach for Android?
- Install mysql-python return error in CentOs
- How can I run all JUnit unit tests except those ending in “IntegrationTest” in my IntelliJ IDEA project using the...
- Manage source under git and svn simultanously - does it make sense?
- In Python, what's a good pattern for disabling certain code during unit tests?
- Best way to test code speed in C++ without profiler, or does it not make sense to try?
- Python Packages?
- Make a PyCharm project inheriting global site-packages, after creating the project?
- How do I inherit abstract unit tests in Ruby?
- Does pytest parametrized test work with unittest class based tests?
- In Visual Studio Test, how to make a playlist which automatically excludes certain tests?
- How to mock.patch a class imported in another module
- Ubuntu - How to install a Python module (BeautifulSoup) on Python 3.3 instead of Python 2.7?
- How to run Dojo DOH unit-tests through Jenkins?
- How to organize python test in a way that I can run all tests in a single command?
- When should I use $provide versus Jasmine Spies in my Angular JS Unit tests
- Copy in-memory SQLite Database to make unit tests faster
- in HFT does it make sense to try to parallel orders processing?
- scala. higher order function calling by name. does it make sense
- Python: How do I make temporary files in my test suite?
- Does OOP make sense for small scripts?
- Does it make sense to have max-age and s-maxage in the Cache-Control HTTP header?
- How not to build before executing unit tests in Visual Studio 2010
- Should Python unittests be in a separate module?
- Does it make sense to use MetadataType to enforce validations in case of Code First?
- Using QT Unit Tests in a project - conflicting main(…) functions
- How to configure gradle to use logback-classic ONLY for unit tests in Android?
- In there something similar to Java's Thread.yield() in Python? Does that even make sense?
- Does it Make Sense to Map a Graph Data-structure into a Relational Database?
- Unit tests in Android Studio 0.8
- Pyautogui screenshot. Where does it go? How to save and find later?
- Is it OK to use SpringRunner in unit tests?
- What difference does it make when I include <limits> or <limits.h> in my c++ code
- Is there a way to *prevent* ReSharper from running an assembly's unit tests in parallel?
- Do I need to unsubscribe from subscriptions in my unit tests?
- Does it make sense to use source control to manage graphics files (e.g. PSDs & AI files)
- Does it make sense to catch ThreadAbortException and perform no action?
- How to set up a resource shared by several unit tests?
- Does it make sense to use a framework for a simple java web app?
- Unable to install packages after R update: unable to access index for repository: internet routines cannot be loaded
- Does DI make sense in a desktop app?
- When does it make sense to typedef basic data types?
- How to use Mockito/Hamcrest in unit tests in Android Studio
- How to install PyGI (Python Gobject Introspection) on Windows?
- Does it make sense to use Google DataFlow/Apache Beam to parallelize image processing or crawling tasks?
- How do I group unit tests in Django at a higher granularity than the app?
- Python 3 virtualenv with site packages does not bootstrap pip
- What is a good way in maven/surefire to clean up after unit tests, whether they pass or not?
- How to make python unit tests always find test data files when run from different working directories?
- Does it make sense to mark variable as final in groovy?
- Why does it take longer to import a function from a module than the entire module itself?
- Use time elapsed as assertion in unit tests
- Is it a good practice to mock Automapper in unit tests?
- Does it make sense to permanently delete versions from a VCS as part of a normal development process?
- Writing unit tests in my compiler (which generates IL)
- Does it make sense to use a pool of Actors?
- How make access to injected ngControl from unit tests?
- HTTP server for unit tests in Delphi
- What's the life cycle of Unit Tests in C#
- Getting intValue from Integer, does it make any sense?
- Does it make sense to use const for all variables that will never be changed?
- How do I make calls to AWS with Python 3 and httplib2 on Windows 7?
- Does it ever make sense to overload unary operator &?
- How apply Unit tests in ASP.NET webforms
- package-info.java package annotations to affect all classes, including ones in sub packages
- c - why does it make sense that indexing a character pointer is an int?
- Does it make sense to use both countvectorizer and tfidfvectorizer as feature vectors for text clustering with KMeans?
- Does it make sense to use Codeigniter form helper?
- How to test both Python and C++ in one .travis.yml without running the C++ multiple times?
- Pip installing packages to global site-packages when inside virtual environment
- Migrate site-packages/modules installed with pip from older to newer/latest version of python
- What's more efficient in Python: `key not in list` or `not key in list`?
- If we do not support IE6, does it make sense to gzip Javascript files for IE?
- Does it make sense to deploy a WAR with a webapp to Maven central repository?
- Running python nose tests in virtual-env
- Does it make sense to create a `Copyable` type interface instead of using `Cloneable`?
- python unit test patch mock method not returning the return values
- Does it ever make sense to run more partitions than number of cores?
- How to include non-python reference files in Azure Function?
- In which cases does it make sense to have multiple projects in one solution?
- Python Unit Testing with two mock objects, how to verify call-order?
- What sense does it make to flush a StringWriter in Java?
- Reselect - does it ever make sense to create a memorized selector which is just used to get part of the state?
- Is there a way to run C++ Unit Tests tests in parallel?
- Python: how to mock a kafka topic for unit tests?
- How to make Unit Tests aware of Application.Resources
- Singletons to facilate unit tests in a legacy code base. A good idea or not?
- How to install python packages in a Google Dataproc cluster
- Does it make sense for equals and compareTo to be inconsistent?
- Python unit testing code which calls OS/Module level python functions
- Why do I get "expected an indented block" when I try to run my Python script? [closed]
- Does it make sense to re-throwing exception in catch block?
- C++11 atomics: does it make sense, or is it even possible, to use them with memory mapped I/O?
- it's possible to determine how many lines exist in file without per line iteration?
- Easy_install's --prefix option doesn't change where it tries to install my package
- How do I get Eclipse to run all of my Groovy unit tests?
- Does it make sense to pass a "reference type" to a method as a parameter with 'ref' key?
- drop into an interactive session to examine a failed unit test
- How can I make Python's coverage tool fail if any unit tests fail?
- How to pause a python script running in terminal
- Unable to install packages in Anaconda virtual environment. 'Packages are not available from current channels'
- How to check if python is installed in windows from java?
- Does it make sense to load scripts concurrently in Java 8 Nashorn JavaScript engine
Only authorized users can answer the Search term. Please sign in first, or register a free account.
after researching this issue, and until someone more experienced has a minute to weigh in to the contrary, my understanding is that the simple answer is: "no, unit tests should not be installed, only included in the source distribution".
in the handful of cases i found where tests were installed, all turned out to be accidental and it's easier than one might think to make the mistake without noticing it.
here's how it happens:
packages=find_packages()
parameter is used in setup.py so packages can be found without having to list them out explicitly.test
folder is made into a package (by adding__init__.py
) so tests can reference the modules they test using relative naming (likefrom .. import pkg.mod
).setuptools
installstest
as a separate package, alongside the other(s) in the project. note this means you can executeimport test
in the python interpreter and it works, almost certainly not what you intended, especially since a lot of other folks use that name for their test directory :)the fix is to use the setting:
packages=find_packages(exclude=['test'])
to prevent your test directory from being installed.