Comments (2)
My original plan was to integrate with unittest, or maybe as a nose plugin. I did some investigation into unittest and nose and just didn't have the patience to come to a thorough understanding of how to hook into either of them effectively. It's probably a lot easier than it seemed to me at the time but I was anxious to get something working so I went ahead with a standalone project.
Basically, we need to be able to run several setup methods (given, when, collect) followed by one or more assertion methods (then), and ending with a single cleanup method (after). One aspect of unittest that seemed like trouble was its philosophy of running the setup code for every test method in a class, which is just extra work.
Are you already an expert (or would you like to become an expert) with the innards of unittest or nose? I'd welcome your input/contributions in this direction. Thanks for reaching out!
from pyspecs.
BTW, I should mention that when I was first experimenting with the idea for this project I did have a TestCase-based solution:
https://github.com/mdwhatcott/pyspecs-depracated/tree/experimental
The 'experimental' branch implemented a class (UnitSpec) that inherits from TestCase and is picked up the the unittest runner. The only problem with it is that the setup methods (@given, @when) are run for each assertion method (@then) which I couldn't live with in the long-term. The classmethod-based setup and teardown functions seemed cumbersome to hook into. Any ideas?
from pyspecs.
Related Issues (15)
- Add Travis job. HOT 1
- Nose 2 compatibility HOT 7
- Incorrect example (maybe) HOT 4
- Example of how to handle an exception HOT 7
- pip3 install pyspecs fails HOT 22
- pip install pyspecs fails HOT 2
- No UTF-8 characters in the output HOT 2
- License? HOT 1
- Need to flush stdout for darwin HOT 1
- More options for targeting files to load (import) and which test files to run HOT 1
- dot output as a less verbose option? HOT 2
- Live step name reporting HOT 1
- A small enhancement to the pyspecs syntax HOT 2
- Python 3 compatibility HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyspecs.