futoase/PyQCheck — pull request #11 by Gab-km (2014-10-12 23:11:57+00:00)
Title: Refactoring and redesigning

This Pull Request is a **preparation** to make the issue #10 done.

This includes:

* Seperation of concerns, to separate `arbitrary` module into `prop` module for properties and `PrettyPrinter` class in `util` module for printing

This allows us:

* To introduce changes into PyQCheck more easily

This keeps most of the PyQCheck APIs unchanged, except for only 2 changes: `Arbitrary#run` and `Arbitrary#result`. Before this changes, you could write a simple check with `Arbitrary` as following:

```python
# 1
Arbitrary('integer', 'integer').property(
'x * y == y * x and x + y == y + x',
lambda x, y: x * y == y * x and x + y == y + x
).run(10).result()
```

or

```python
# 2
Arbitrary('integer', 'integer').property(
'x * y == y * x and x + y == y + x',
lambda x, y: x * y == y * x and x + y == y + x
).run(10, verbose=True).result()
```

After this changes, latter case(No. 2) wouldn' work and you rewrite the code below:

```python
# 2.1
Arbitrary('integer', 'integer').property(
'x * y == y * x and x + y == y + x',
lambda x, y: x * y == y * x and x + y == y + x
).run(10).result(verbose=True) # 'verbose' argument is moved from 'run' method to 'result' method
```