Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
258110d6
Kaydet (Commit)
258110d6
authored
Mar 14, 2019
tarafından
Mariusz Felisiak
Kaydeden (comit)
Tim Graham
Mar 14, 2019
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Simplified test_transform()s in db_functions.math.
üst
a57c783d
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
32 additions
and
32 deletions
+32
-32
test_abs.py
tests/db_functions/math/test_abs.py
+2
-2
test_acos.py
tests/db_functions/math/test_acos.py
+2
-2
test_asin.py
tests/db_functions/math/test_asin.py
+2
-2
test_atan.py
tests/db_functions/math/test_atan.py
+2
-2
test_ceil.py
tests/db_functions/math/test_ceil.py
+2
-2
test_cos.py
tests/db_functions/math/test_cos.py
+2
-2
test_cot.py
tests/db_functions/math/test_cot.py
+2
-2
test_degrees.py
tests/db_functions/math/test_degrees.py
+2
-2
test_exp.py
tests/db_functions/math/test_exp.py
+2
-2
test_floor.py
tests/db_functions/math/test_floor.py
+2
-2
test_ln.py
tests/db_functions/math/test_ln.py
+2
-2
test_radians.py
tests/db_functions/math/test_radians.py
+2
-2
test_round.py
tests/db_functions/math/test_round.py
+2
-2
test_sin.py
tests/db_functions/math/test_sin.py
+2
-2
test_sqrt.py
tests/db_functions/math/test_sqrt.py
+2
-2
test_tan.py
tests/db_functions/math/test_tan.py
+2
-2
No files found.
tests/db_functions/math/test_abs.py
Dosyayı görüntüle @
258110d6
...
...
@@ -49,5 +49,5 @@ class AbsTests(TestCase):
with
register_lookup
(
DecimalField
,
Abs
):
DecimalModel
.
objects
.
create
(
n1
=
Decimal
(
'-1.5'
),
n2
=
Decimal
(
'0'
))
DecimalModel
.
objects
.
create
(
n1
=
Decimal
(
'-0.5'
),
n2
=
Decimal
(
'0'
))
obj
s
=
DecimalModel
.
objects
.
filter
(
n1__abs__gt
=
1
)
self
.
assert
QuerysetEqual
(
objs
,
[
Decimal
(
'-1.5'
)],
lambda
a
:
a
.
n1
)
obj
=
DecimalModel
.
objects
.
filter
(
n1__abs__gt
=
1
)
.
get
(
)
self
.
assert
Equal
(
obj
.
n1
,
Decimal
(
'-1.5'
)
)
tests/db_functions/math/test_acos.py
Dosyayı görüntüle @
258110d6
...
...
@@ -50,5 +50,5 @@ class ACosTests(TestCase):
with
register_lookup
(
DecimalField
,
ACos
):
DecimalModel
.
objects
.
create
(
n1
=
Decimal
(
'0.5'
),
n2
=
Decimal
(
'0'
))
DecimalModel
.
objects
.
create
(
n1
=
Decimal
(
'-0.9'
),
n2
=
Decimal
(
'0'
))
obj
s
=
DecimalModel
.
objects
.
filter
(
n1__acos__lt
=
2
)
self
.
assert
QuerysetEqual
(
objs
,
[
Decimal
(
'0.5'
)],
lambda
a
:
a
.
n1
)
obj
=
DecimalModel
.
objects
.
filter
(
n1__acos__lt
=
2
)
.
get
(
)
self
.
assert
Equal
(
obj
.
n1
,
Decimal
(
'0.5'
)
)
tests/db_functions/math/test_asin.py
Dosyayı görüntüle @
258110d6
...
...
@@ -50,5 +50,5 @@ class ASinTests(TestCase):
with
register_lookup
(
DecimalField
,
ASin
):
DecimalModel
.
objects
.
create
(
n1
=
Decimal
(
'0.1'
),
n2
=
Decimal
(
'0'
))
DecimalModel
.
objects
.
create
(
n1
=
Decimal
(
'1.0'
),
n2
=
Decimal
(
'0'
))
obj
s
=
DecimalModel
.
objects
.
filter
(
n1__asin__gt
=
1
)
self
.
assert
QuerysetEqual
(
objs
,
[
Decimal
(
'1.0'
)],
lambda
a
:
a
.
n1
)
obj
=
DecimalModel
.
objects
.
filter
(
n1__asin__gt
=
1
)
.
get
(
)
self
.
assert
Equal
(
obj
.
n1
,
Decimal
(
'1.0'
)
)
tests/db_functions/math/test_atan.py
Dosyayı görüntüle @
258110d6
...
...
@@ -50,5 +50,5 @@ class ATanTests(TestCase):
with
register_lookup
(
DecimalField
,
ATan
):
DecimalModel
.
objects
.
create
(
n1
=
Decimal
(
'3.12'
),
n2
=
Decimal
(
'0'
))
DecimalModel
.
objects
.
create
(
n1
=
Decimal
(
'-5'
),
n2
=
Decimal
(
'0'
))
obj
s
=
DecimalModel
.
objects
.
filter
(
n1__atan__gt
=
0
)
self
.
assert
QuerysetEqual
(
objs
,
[
Decimal
(
'3.12'
)],
lambda
a
:
a
.
n1
)
obj
=
DecimalModel
.
objects
.
filter
(
n1__atan__gt
=
0
)
.
get
(
)
self
.
assert
Equal
(
obj
.
n1
,
Decimal
(
'3.12'
)
)
tests/db_functions/math/test_ceil.py
Dosyayı görüntüle @
258110d6
...
...
@@ -50,5 +50,5 @@ class CeilTests(TestCase):
with
register_lookup
(
DecimalField
,
Ceil
):
DecimalModel
.
objects
.
create
(
n1
=
Decimal
(
'3.12'
),
n2
=
Decimal
(
'0'
))
DecimalModel
.
objects
.
create
(
n1
=
Decimal
(
'1.25'
),
n2
=
Decimal
(
'0'
))
obj
s
=
DecimalModel
.
objects
.
filter
(
n1__ceil__gt
=
3
)
self
.
assert
QuerysetEqual
(
objs
,
[
Decimal
(
'3.12'
)],
lambda
a
:
a
.
n1
)
obj
=
DecimalModel
.
objects
.
filter
(
n1__ceil__gt
=
3
)
.
get
(
)
self
.
assert
Equal
(
obj
.
n1
,
Decimal
(
'3.12'
)
)
tests/db_functions/math/test_cos.py
Dosyayı görüntüle @
258110d6
...
...
@@ -50,5 +50,5 @@ class CosTests(TestCase):
with
register_lookup
(
DecimalField
,
Cos
):
DecimalModel
.
objects
.
create
(
n1
=
Decimal
(
'-8.0'
),
n2
=
Decimal
(
'0'
))
DecimalModel
.
objects
.
create
(
n1
=
Decimal
(
'3.14'
),
n2
=
Decimal
(
'0'
))
obj
s
=
DecimalModel
.
objects
.
filter
(
n1__cos__gt
=-
0.2
)
self
.
assert
QuerysetEqual
(
objs
,
[
Decimal
(
'-8.0'
)],
lambda
a
:
a
.
n1
)
obj
=
DecimalModel
.
objects
.
filter
(
n1__cos__gt
=-
0.2
)
.
get
(
)
self
.
assert
Equal
(
obj
.
n1
,
Decimal
(
'-8.0'
)
)
tests/db_functions/math/test_cot.py
Dosyayı görüntüle @
258110d6
...
...
@@ -50,5 +50,5 @@ class CotTests(TestCase):
with
register_lookup
(
DecimalField
,
Cot
):
DecimalModel
.
objects
.
create
(
n1
=
Decimal
(
'12.0'
),
n2
=
Decimal
(
'0'
))
DecimalModel
.
objects
.
create
(
n1
=
Decimal
(
'1.0'
),
n2
=
Decimal
(
'0'
))
obj
s
=
DecimalModel
.
objects
.
filter
(
n1__cot__gt
=
0
)
self
.
assert
QuerysetEqual
(
objs
,
[
Decimal
(
'1.0'
)],
lambda
a
:
a
.
n1
)
obj
=
DecimalModel
.
objects
.
filter
(
n1__cot__gt
=
0
)
.
get
(
)
self
.
assert
Equal
(
obj
.
n1
,
Decimal
(
'1.0'
)
)
tests/db_functions/math/test_degrees.py
Dosyayı görüntüle @
258110d6
...
...
@@ -50,5 +50,5 @@ class DegreesTests(TestCase):
with
register_lookup
(
DecimalField
,
Degrees
):
DecimalModel
.
objects
.
create
(
n1
=
Decimal
(
'5.4'
),
n2
=
Decimal
(
'0'
))
DecimalModel
.
objects
.
create
(
n1
=
Decimal
(
'-30'
),
n2
=
Decimal
(
'0'
))
obj
s
=
DecimalModel
.
objects
.
filter
(
n1__degrees__gt
=
0
)
self
.
assert
QuerysetEqual
(
objs
,
[
Decimal
(
'5.4'
)],
lambda
a
:
a
.
n1
)
obj
=
DecimalModel
.
objects
.
filter
(
n1__degrees__gt
=
0
)
.
get
(
)
self
.
assert
Equal
(
obj
.
n1
,
Decimal
(
'5.4'
)
)
tests/db_functions/math/test_exp.py
Dosyayı görüntüle @
258110d6
...
...
@@ -50,5 +50,5 @@ class ExpTests(TestCase):
with
register_lookup
(
DecimalField
,
Exp
):
DecimalModel
.
objects
.
create
(
n1
=
Decimal
(
'12.0'
),
n2
=
Decimal
(
'0'
))
DecimalModel
.
objects
.
create
(
n1
=
Decimal
(
'-1.0'
),
n2
=
Decimal
(
'0'
))
obj
s
=
DecimalModel
.
objects
.
filter
(
n1__exp__gt
=
10
)
self
.
assert
QuerysetEqual
(
objs
,
[
Decimal
(
'12.0'
)],
lambda
a
:
a
.
n1
)
obj
=
DecimalModel
.
objects
.
filter
(
n1__exp__gt
=
10
)
.
get
(
)
self
.
assert
Equal
(
obj
.
n1
,
Decimal
(
'12.0'
)
)
tests/db_functions/math/test_floor.py
Dosyayı görüntüle @
258110d6
...
...
@@ -50,5 +50,5 @@ class FloorTests(TestCase):
with
register_lookup
(
DecimalField
,
Floor
):
DecimalModel
.
objects
.
create
(
n1
=
Decimal
(
'5.4'
),
n2
=
Decimal
(
'0'
))
DecimalModel
.
objects
.
create
(
n1
=
Decimal
(
'3.4'
),
n2
=
Decimal
(
'0'
))
obj
s
=
DecimalModel
.
objects
.
filter
(
n1__floor__gt
=
4
)
self
.
assert
QuerysetEqual
(
objs
,
[
Decimal
(
'5.4'
)],
lambda
a
:
a
.
n1
)
obj
=
DecimalModel
.
objects
.
filter
(
n1__floor__gt
=
4
)
.
get
(
)
self
.
assert
Equal
(
obj
.
n1
,
Decimal
(
'5.4'
)
)
tests/db_functions/math/test_ln.py
Dosyayı görüntüle @
258110d6
...
...
@@ -50,5 +50,5 @@ class LnTests(TestCase):
with
register_lookup
(
DecimalField
,
Ln
):
DecimalModel
.
objects
.
create
(
n1
=
Decimal
(
'12.0'
),
n2
=
Decimal
(
'0'
))
DecimalModel
.
objects
.
create
(
n1
=
Decimal
(
'1.0'
),
n2
=
Decimal
(
'0'
))
obj
s
=
DecimalModel
.
objects
.
filter
(
n1__ln__gt
=
0
)
self
.
assert
QuerysetEqual
(
objs
,
[
Decimal
(
'12.0'
)],
lambda
a
:
a
.
n1
)
obj
=
DecimalModel
.
objects
.
filter
(
n1__ln__gt
=
0
)
.
get
(
)
self
.
assert
Equal
(
obj
.
n1
,
Decimal
(
'12.0'
)
)
tests/db_functions/math/test_radians.py
Dosyayı görüntüle @
258110d6
...
...
@@ -50,5 +50,5 @@ class RadiansTests(TestCase):
with
register_lookup
(
DecimalField
,
Radians
):
DecimalModel
.
objects
.
create
(
n1
=
Decimal
(
'2.0'
),
n2
=
Decimal
(
'0'
))
DecimalModel
.
objects
.
create
(
n1
=
Decimal
(
'-1.0'
),
n2
=
Decimal
(
'0'
))
obj
s
=
DecimalModel
.
objects
.
filter
(
n1__radians__gt
=
0
)
self
.
assert
QuerysetEqual
(
objs
,
[
Decimal
(
'2.0'
)],
lambda
a
:
a
.
n1
)
obj
=
DecimalModel
.
objects
.
filter
(
n1__radians__gt
=
0
)
.
get
(
)
self
.
assert
Equal
(
obj
.
n1
,
Decimal
(
'2.0'
)
)
tests/db_functions/math/test_round.py
Dosyayı görüntüle @
258110d6
...
...
@@ -49,5 +49,5 @@ class RoundTests(TestCase):
with
register_lookup
(
DecimalField
,
Round
):
DecimalModel
.
objects
.
create
(
n1
=
Decimal
(
'2.0'
),
n2
=
Decimal
(
'0'
))
DecimalModel
.
objects
.
create
(
n1
=
Decimal
(
'-1.0'
),
n2
=
Decimal
(
'0'
))
obj
s
=
DecimalModel
.
objects
.
filter
(
n1__round__gt
=
0
)
self
.
assert
QuerysetEqual
(
objs
,
[
Decimal
(
'2.0'
)],
lambda
a
:
a
.
n1
)
obj
=
DecimalModel
.
objects
.
filter
(
n1__round__gt
=
0
)
.
get
(
)
self
.
assert
Equal
(
obj
.
n1
,
Decimal
(
'2.0'
)
)
tests/db_functions/math/test_sin.py
Dosyayı görüntüle @
258110d6
...
...
@@ -50,5 +50,5 @@ class SinTests(TestCase):
with
register_lookup
(
DecimalField
,
Sin
):
DecimalModel
.
objects
.
create
(
n1
=
Decimal
(
'5.4'
),
n2
=
Decimal
(
'0'
))
DecimalModel
.
objects
.
create
(
n1
=
Decimal
(
'0.1'
),
n2
=
Decimal
(
'0'
))
obj
s
=
DecimalModel
.
objects
.
filter
(
n1__sin__lt
=
0
)
self
.
assert
QuerysetEqual
(
objs
,
[
Decimal
(
'5.4'
)],
lambda
a
:
a
.
n1
)
obj
=
DecimalModel
.
objects
.
filter
(
n1__sin__lt
=
0
)
.
get
(
)
self
.
assert
Equal
(
obj
.
n1
,
Decimal
(
'5.4'
)
)
tests/db_functions/math/test_sqrt.py
Dosyayı görüntüle @
258110d6
...
...
@@ -50,5 +50,5 @@ class SqrtTests(TestCase):
with
register_lookup
(
DecimalField
,
Sqrt
):
DecimalModel
.
objects
.
create
(
n1
=
Decimal
(
'6.0'
),
n2
=
Decimal
(
'0'
))
DecimalModel
.
objects
.
create
(
n1
=
Decimal
(
'1.0'
),
n2
=
Decimal
(
'0'
))
obj
s
=
DecimalModel
.
objects
.
filter
(
n1__sqrt__gt
=
2
)
self
.
assert
QuerysetEqual
(
objs
,
[
Decimal
(
'6.0'
)],
lambda
a
:
a
.
n1
)
obj
=
DecimalModel
.
objects
.
filter
(
n1__sqrt__gt
=
2
)
.
get
(
)
self
.
assert
Equal
(
obj
.
n1
,
Decimal
(
'6.0'
)
)
tests/db_functions/math/test_tan.py
Dosyayı görüntüle @
258110d6
...
...
@@ -50,5 +50,5 @@ class TanTests(TestCase):
with
register_lookup
(
DecimalField
,
Tan
):
DecimalModel
.
objects
.
create
(
n1
=
Decimal
(
'0.0'
),
n2
=
Decimal
(
'0'
))
DecimalModel
.
objects
.
create
(
n1
=
Decimal
(
'12.0'
),
n2
=
Decimal
(
'0'
))
obj
s
=
DecimalModel
.
objects
.
filter
(
n1__tan__lt
=
0
)
self
.
assert
QuerysetEqual
(
objs
,
[
Decimal
(
'12.0'
)],
lambda
a
:
a
.
n1
)
obj
=
DecimalModel
.
objects
.
filter
(
n1__tan__lt
=
0
)
.
get
(
)
self
.
assert
Equal
(
obj
.
n1
,
Decimal
(
'12.0'
)
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment