ยปCore Development>Code coverage>Lib/test/test_future3.py

Python code coverage for Lib/test/test_future3.py

#countcontent
1n/afrom __future__ import nested_scopes
2n/afrom __future__ import division
3n/a
4n/aimport unittest
5n/a
6n/ax = 2
7n/adef nester():
8n/a x = 3
9n/a def inner():
10n/a return x
11n/a return inner()
12n/a
13n/a
14n/aclass TestFuture(unittest.TestCase):
15n/a
16n/a def test_floor_div_operator(self):
17n/a self.assertEqual(7 // 2, 3)
18n/a
19n/a def test_true_div_as_default(self):
20n/a self.assertAlmostEqual(7 / 2, 3.5)
21n/a
22n/a def test_nested_scopes(self):
23n/a self.assertEqual(nester(), 3)
24n/a
25n/aif __name__ == "__main__":
26n/a unittest.main()