projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bt2: Mass clock_value -> clock_snapshot rename
[babeltrace.git]
/
tests
/
bindings
/
python
/
bt2
/
test_clock_class.py
diff --git
a/tests/bindings/python/bt2/test_clock_class.py
b/tests/bindings/python/bt2/test_clock_class.py
index 9b9c50e96eb2c22890649de8306772d5511d8749..7498be44125c47bfc87a83d9ac59f42f81b0c316 100644
(file)
--- a/
tests/bindings/python/bt2/test_clock_class.py
+++ b/
tests/bindings/python/bt2/test_clock_class.py
@@
-134,9
+134,9
@@
class ClockClassTestCase(unittest.TestCase):
with self.assertRaises(TypeError):
self._cc.uuid = object()
with self.assertRaises(TypeError):
self._cc.uuid = object()
- def test_create_clock_
value
(self):
- c
v
= self._cc(756)
- self.assertEqual(c
v
.clock_class.addr, self._cc.addr)
+ def test_create_clock_
snapshot
(self):
+ c
s
= self._cc(756)
+ self.assertEqual(c
s
.clock_class.addr, self._cc.addr)
def _test_copy(self, cpy):
self.assertIsNot(cpy, self._cc)
def _test_copy(self, cpy):
self.assertIsNot(cpy, self._cc)
@@
-251,19
+251,19
@@
class ClockClassTestCase(unittest.TestCase):
@unittest.skip("this is broken")
@unittest.skip("this is broken")
-class Clock
Value
TestCase(unittest.TestCase):
+class Clock
Snapshot
TestCase(unittest.TestCase):
def setUp(self):
self._cc = bt2.ClockClass('salut', 1000,
offset=bt2.ClockClassOffset(45, 354))
def setUp(self):
self._cc = bt2.ClockClass('salut', 1000,
offset=bt2.ClockClassOffset(45, 354))
- self._c
v
= self._cc(123)
+ self._c
s
= self._cc(123)
def tearDown(self):
del self._cc
def tearDown(self):
del self._cc
- del self._c
v
+ del self._c
s
def test_create_default(self):
def test_create_default(self):
- self.assertEqual(self._c
v
.clock_class.addr, self._cc.addr)
- self.assertEqual(self._c
v
.cycles, 123)
+ self.assertEqual(self._c
s
.clock_class.addr, self._cc.addr)
+ self.assertEqual(self._c
s
.cycles, 123)
def test_create_invalid_cycles_type(self):
with self.assertRaises(TypeError):
def test_create_invalid_cycles_type(self):
with self.assertRaises(TypeError):
@@
-272,41
+272,41
@@
class ClockValueTestCase(unittest.TestCase):
def test_ns_from_epoch(self):
s_from_epoch = 45 + ((354 + 123) / 1000)
ns_from_epoch = int(s_from_epoch * 1e9)
def test_ns_from_epoch(self):
s_from_epoch = 45 + ((354 + 123) / 1000)
ns_from_epoch = int(s_from_epoch * 1e9)
- self.assertEqual(self._c
v
.ns_from_epoch, ns_from_epoch)
+ self.assertEqual(self._c
s
.ns_from_epoch, ns_from_epoch)
def test_eq(self):
def test_eq(self):
- c
v
1 = self._cc(123)
- c
v
2 = self._cc(123)
- self.assertEqual(c
v1, cv
2)
+ c
s
1 = self._cc(123)
+ c
s
2 = self._cc(123)
+ self.assertEqual(c
s1, cs
2)
def test_eq_int(self):
def test_eq_int(self):
- c
v
1 = self._cc(123)
- self.assertEqual(c
v
1, 123)
+ c
s
1 = self._cc(123)
+ self.assertEqual(c
s
1, 123)
def test_ne_clock_class(self):
cc1 = bt2.ClockClass('yes', 1500)
cc2 = bt2.ClockClass('yes', 1501)
def test_ne_clock_class(self):
cc1 = bt2.ClockClass('yes', 1500)
cc2 = bt2.ClockClass('yes', 1501)
- c
v
1 = cc1(123)
- c
v
2 = cc2(123)
- self.assertNotEqual(c
v1, cv
2)
+ c
s
1 = cc1(123)
+ c
s
2 = cc2(123)
+ self.assertNotEqual(c
s1, cs
2)
def test_ne_cycles(self):
def test_ne_cycles(self):
- c
v
1 = self._cc(123)
- c
v
2 = self._cc(125)
- self.assertNotEqual(c
v1, cv
2)
+ c
s
1 = self._cc(123)
+ c
s
2 = self._cc(125)
+ self.assertNotEqual(c
s1, cs
2)
def test_eq_invalid(self):
def test_eq_invalid(self):
- self.assertFalse(self._c
v
== 23)
+ self.assertFalse(self._c
s
== 23)
def _test_copy(self, cpy):
def _test_copy(self, cpy):
- self.assertIsNot(cpy, self._c
v
)
- self.assertNotEqual(cpy.addr, self._c
v
.addr)
- self.assertEqual(cpy, self._c
v
)
+ self.assertIsNot(cpy, self._c
s
)
+ self.assertNotEqual(cpy.addr, self._c
s
.addr)
+ self.assertEqual(cpy, self._c
s
)
def test_copy(self):
def test_copy(self):
- cpy = copy.copy(self._c
v
)
+ cpy = copy.copy(self._c
s
)
self._test_copy(cpy)
def test_deepcopy(self):
self._test_copy(cpy)
def test_deepcopy(self):
- cpy = copy.deepcopy(self._c
v
)
+ cpy = copy.deepcopy(self._c
s
)
self._test_copy(cpy)
self._test_copy(cpy)
This page took
0.037522 seconds
and
4
git commands to generate.