Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
sakia
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
clients
python
sakia
Commits
435c22b6
Commit
435c22b6
authored
5 years ago
by
Vincent Texier
Browse files
Options
Downloads
Patches
Plain Diff
[fix]
#807
fix unit tests and README.md
parent
49a54327
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!781
0.52.0
,
!780
Issue 807
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+2
-1
2 additions, 1 deletion
README.md
tests/unit/money/test_quantitative_zsum.py
+6
-6
6 additions, 6 deletions
tests/unit/money/test_quantitative_zsum.py
tests/unit/money/test_relative_zsum.py
+6
-6
6 additions, 6 deletions
tests/unit/money/test_relative_zsum.py
with
14 additions
and
13 deletions
README.md
+
2
−
1
View file @
435c22b6
...
...
@@ -103,10 +103,11 @@ make check
```
bash
make tests
```
> **Warning:** *do not run tests with sakia installed in your dev environment, because pytest will use the installed Sakia.*
*
Run only some unit tests by passing a special ENV variable:
```
bash
make tests
TESTS_FILTER
=
tests
.documents.test_block.TestBlock.test_fromraw
make tests
TESTS_FILTER
=
tests
/functional/test_transfer_dialog.py::test_transfer
```
## Packaging and deploy
...
...
This diff is collapsed.
Click to expand it.
tests/unit/money/test_quantitative_zsum.py
+
6
−
6
View file @
435c22b6
...
...
@@ -6,7 +6,7 @@ def test_value(application_with_one_connection, bob):
110
,
bob
.
currency
,
application_with_one_connection
,
None
)
value
=
referential
.
value
()
assert
value
==
-
10.79
assert
value
==
1.1
def
test_differential
(
application_with_one_connection
,
bob
):
...
...
@@ -14,7 +14,7 @@ def test_differential(application_with_one_connection, bob):
110
,
bob
.
currency
,
application_with_one_connection
,
None
)
value
=
referential
.
value
()
assert
value
==
-
10.79
assert
value
==
1.1
def
test_localized_no_si
(
application_with_one_connection
,
bob
):
...
...
@@ -22,7 +22,7 @@ def test_localized_no_si(application_with_one_connection, bob):
110
,
bob
.
currency
,
application_with_one_connection
,
None
)
value
=
referential
.
localized
(
units
=
True
)
assert
value
==
"
-10.79
Q0
"
assert
value
==
"
1.10
Q0
"
def
test_localized_with_si
(
application_with_one_connection
,
bob
):
...
...
@@ -31,7 +31,7 @@ def test_localized_with_si(application_with_one_connection, bob):
110
*
1000
,
bob
.
currency
,
application_with_one_connection
,
None
)
value
=
referential
.
localized
(
units
=
True
,
show_base
=
True
)
assert
value
==
"
1,
088.11
Q0
"
assert
value
==
"
1,
100.00
Q0
"
def
test_localized_no_units_no_si
(
application_with_one_connection
,
bob
):
...
...
@@ -40,7 +40,7 @@ def test_localized_no_units_no_si(application_with_one_connection, bob):
110
,
bob
.
currency
,
application_with_one_connection
,
None
)
value
=
referential
.
localized
(
units
=
False
,
show_base
=
False
)
assert
value
==
"
-10.79
"
assert
value
==
"
1.10
"
def
test_localized_no_units_with_si
(
application_with_one_connection
,
bob
):
...
...
@@ -49,7 +49,7 @@ def test_localized_no_units_with_si(application_with_one_connection, bob):
110
*
1000
,
bob
.
currency
,
application_with_one_connection
,
None
)
value
=
referential
.
localized
(
units
=
False
,
show_base
=
True
)
assert
value
==
"
1,
088.11
"
assert
value
==
"
1,
100.00
"
def
test_diff_localized_no_si
(
application_with_one_connection
,
bob
):
...
...
This diff is collapsed.
Click to expand it.
tests/unit/money/test_relative_zsum.py
+
6
−
6
View file @
435c22b6
...
...
@@ -7,19 +7,19 @@ def test_value(application_with_one_connection, bob):
2702
,
bob
.
currency
,
application_with_one_connection
,
None
)
value
=
referential
.
value
()
assert
value
==
approx
(
8.70007
)
assert
value
==
approx
(
2702
)
def
test_differential
(
application_with_one_connection
,
bob
):
referential
=
RelativeZSum
(
111
,
bob
.
currency
,
application_with_one_connection
,
None
)
value
=
referential
.
value
()
assert
value
==
approx
(
-
3.521619496
)
assert
value
==
approx
(
111
)
def
test_localized_no_si
(
application_with_one_connection
,
bob
):
referential
=
RelativeZSum
(
110
,
bob
.
currency
,
application_with_one_connection
,
None
)
value
=
referential
.
localized
(
units
=
True
)
assert
value
==
"
-3.53
R0 UD
"
assert
value
==
"
110.00
R0 UD
"
def
test_localized_with_si
(
application_with_one_connection
,
bob
):
...
...
@@ -27,7 +27,7 @@ def test_localized_with_si(application_with_one_connection, bob):
referential
=
RelativeZSum
(
1
,
bob
.
currency
,
application_with_one_connection
,
None
)
value
=
referential
.
localized
(
units
=
True
,
show_base
=
True
)
assert
value
==
"
-4.040487
R0 UD
"
assert
value
==
"
1.000000
R0 UD
"
def
test_localized_no_units_no_si
(
application_with_one_connection
,
bob
):
...
...
@@ -35,7 +35,7 @@ def test_localized_no_units_no_si(application_with_one_connection, bob):
referential
=
RelativeZSum
(
110
,
bob
.
currency
,
application_with_one_connection
,
None
)
value
=
referential
.
localized
(
units
=
False
,
show_base
=
False
)
assert
value
==
"
-3.526336
"
assert
value
==
"
110.000000
"
def
test_localized_no_units_with_si
(
application_with_one_connection
,
bob
):
...
...
@@ -43,7 +43,7 @@ def test_localized_no_units_with_si(application_with_one_connection, bob):
referential
=
RelativeZSum
(
1
,
bob
.
currency
,
application_with_one_connection
,
None
)
value
=
referential
.
localized
(
units
=
False
,
show_base
=
True
)
assert
value
==
"
-4.040487
"
assert
value
==
"
1.000000
"
def
test_diff_localized_no_si
(
application_with_one_connection
,
bob
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment