-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
83aa492
commit 837196f
Showing
4 changed files
with
52 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
4.0.6 | ||
4.0.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import re | ||
|
||
from unittest import TestCase | ||
from utils.gauge import _numeric_value_pattern | ||
|
||
class TestGauge(TestCase): | ||
def init(self, *args, **kwargs): | ||
super(TestGauge, self).__init__(*args, **kwargs) | ||
|
||
def test_gauge_regexp_integer(self): | ||
## Given | ||
value = 1 | ||
|
||
#When | ||
result = re.search(_numeric_value_pattern, "{}".format(value)) | ||
|
||
## Then | ||
self.assertTrue(result) | ||
|
||
def test_gauge_regexp_float(self): | ||
## Given | ||
value = 1.1 | ||
|
||
#When | ||
result = re.search(_numeric_value_pattern, "{}".format(value)) | ||
|
||
## Then | ||
self.assertTrue(result) | ||
|
||
def test_gauge_regexp_float2(self): | ||
## Given | ||
value = 1.15 | ||
|
||
#When | ||
result = re.search(_numeric_value_pattern, "{}".format(value)) | ||
|
||
## Then | ||
self.assertTrue(result) | ||
|
||
def test_gauge_regexp_string(self): | ||
## Given | ||
value = "yo" | ||
|
||
#When | ||
result = re.search(_numeric_value_pattern, "{}".format(value)) | ||
|
||
## Then | ||
self.assertFalse(result) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
import re | ||
|
||
from unittest import TestCase | ||
from utils.manifests import get_manifest_as_dict | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters