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
import unittest | |
class TestSequenceFunctions(unittest.TestCase): | |
def setUp(self): | |
self.expected_iterable = [0, 1, 2] | |
def test_identical_lists(self): | |
actual_iterable = [0, 1, 2] | |
self.assertSequenceEqual(actual_iterable, self.expected_iterable) | |
def test_one_value_off_actual(self): | |
actual_iterable = [0, 4, 2] |
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
guillaume@kelmis:/scratch/events-warehouse-develop/events-warehouse (feature/13225DimUserIdTable)$ python testing_iterables_with_unittest.py | |
F.FF | |
====================================================================== | |
FAIL: test_empty_actual (__main__.TestSequenceFunctions) | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "testing_iterables_with_unittest.py", line 14, in test_empty_actual | |
self.assertSequenceEqual(actual_iterable, self.expected_iterable) | |
AssertionError: Sequences differ: [] != [0, 1, 2] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# -*- coding: utf-8 -*- | |
# <nbformat>3.0</nbformat> | |
# <headingcell level=1> | |
# "Chance to beat" or C2B empirical estimation | |
# <markdowncell> | |
# We define two and independent random variables $A$ and $B$ and their probability density, respectively $f_A :\mathbb{R} \mapsto [0;1]$ and $f_B: \mathbb{R} \mapsto [0;1]$. The "chance to beat" probability, or $C2B$, is the probability that a sample from $B$ is greater than a sample from $A$, i.e. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer