def test_test_inclu_value_range_class(self):
        self.assertTrue(hasattr(self.tivr1, "td"))
        self.assertEqual(self.tivr1.ti, test_pass().ti)
        self.assertEqual(self.tivr1.tm, test_pass().tm)

        self.assertTrue(hasattr(self.tivr2, "td"))
        self.assertEqual(self.tivr2.ti, test_pass().ti)
        self.assertEqual(self.tivr2.tm, test_pass().tm)

        self.assertTrue(hasattr(self.tivr3, "td"))
        self.assertEqual(self.tivr3.ti, test_pass().ti)
        self.assertEqual(self.tivr3.tm, test_pass().tm)

        self.assertTrue(hasattr(self.tivr4, "td"))
        self.assertEqual(self.tivr4.ti, test_pass().ti)
        self.assertEqual(self.tivr4.tm, test_pass().tm)

        self.assertTrue(hasattr(self.tivr5, "td"))
        self.assertEqual(self.tivr5.ti, test_fail("blah").ti)
        self.assertNotEqual(self.tivr5.tm, test_pass().tm)

        self.assertTrue(hasattr(self.tivr6, "td"))
        self.assertEqual(self.tivr6.ti, test_fail("blah").ti)
        self.assertNotEqual(self.tivr6.tm, test_pass().tm)

        self.assertTrue(hasattr(self.tivr7, "td"))
        self.assertEqual(self.tivr7.ti, test_fail("blah").ti)
        self.assertNotEqual(self.tivr7.tm, test_pass().tm)
Beispiel #2
0
    def test_test_all_false(self):
        self.assertTrue(hasattr(self.taf1, "td"))
        self.assertEqual(self.taf1.ti, test_fail("blah").ti)
        self.assertNotEqual(self.taf1.tm, test_pass().tm)

        self.assertTrue(hasattr(self.taf2, "td"))
        self.assertEqual(self.taf2.ti, test_pass().ti)
        self.assertEqual(self.taf2.tm, test_pass().tm)

        self.assertTrue(hasattr(self.taf3, "td"))
        self.assertEqual(self.taf3.ti, test_fail("blah").ti)
        self.assertNotEqual(self.taf3.tm, test_pass().tm)
Beispiel #3
0
    def test_test_all_true(self):
        self.assertTrue(hasattr(self.tat1, "td"))
        self.assertEqual(self.tat1.ti, test_pass().ti)
        self.assertEqual(self.tat1.tm, test_pass().tm)

        self.assertTrue(hasattr(self.tat2, "td"))
        self.assertEqual(self.tat2.ti, test_fail("blah").ti)
        self.assertNotEqual(self.tat2.tm, test_pass().tm)

        self.assertTrue(hasattr(self.tat3, "td"))
        self.assertEqual(self.tat3.ti, test_fail("blah").ti)
        self.assertNotEqual(self.tat3.tm, test_pass().tm)
Beispiel #4
0
    def test_test_expc_uni_class(self):
        self.assertTrue(hasattr(self.tu1, "td"))
        self.assertEqual(self.tu1.ti, test_pass().ti)
        self.assertEqual(self.tu1.tm, test_pass().tm)

        self.assertTrue(hasattr(self.tu2, "td"))
        self.assertEqual(self.tu2.ti, test_fail("blah").ti)
        self.assertNotEqual(self.tu2.tm, test_pass().tm)

        self.assertTrue(hasattr(self.tu3, "td"))
        self.assertEqual(self.tu3.ti, test_pass().ti)
        self.assertEqual(self.tu3.tm, test_pass().tm)

        self.assertTrue(hasattr(self.tu4, "td"))
        self.assertEqual(self.tu4.ti, test_fail("blah").ti)
        self.assertNotEqual(self.tu4.tm, test_pass().tm)
    def test_test_lt_value_class(self):
        self.assertTrue(hasattr(self.tltv1, "td"))
        self.assertEqual(self.tltv1.ti, test_pass().ti)
        self.assertEqual(self.tltv1.tm, test_pass().tm)

        self.assertTrue(hasattr(self.tltv2, "td"))
        self.assertEqual(self.tltv2.ti, test_fail("blah").ti)
        self.assertNotEqual(self.tltv2.tm, test_pass().tm)

        self.assertTrue(hasattr(self.tltv3, "td"))
        self.assertEqual(self.tltv3.ti, test_pass().ti)
        self.assertEqual(self.tltv3.tm, test_pass().tm)

        self.assertTrue(hasattr(self.tltv4, "td"))
        self.assertEqual(self.tltv4.ti, test_fail("blah").ti)
        self.assertNotEqual(self.tltv4.tm, test_pass().tm)
    def test_test_exclu_lower_inclu_upper_range_class(self):
        self.assertTrue(hasattr(self.teliu1, "td"))
        self.assertEqual(self.teliu1.ti, test_pass().ti)
        self.assertEqual(self.teliu1.tm, test_pass().tm)

        self.assertTrue(hasattr(self.teliu2, "td"))
        self.assertEqual(self.teliu2.ti, test_pass().ti)
        self.assertEqual(self.teliu2.tm, test_pass().tm)

        self.assertTrue(hasattr(self.teliu3, "td"))
        self.assertEqual(self.teliu3.ti, test_fail("blah").ti)
        self.assertNotEqual(self.teliu3.tm, test_pass().tm)

        self.assertTrue(hasattr(self.teliu4, "td"))
        self.assertEqual(self.teliu4.ti, test_fail("blah").ti)
        self.assertNotEqual(self.teliu4.tm, test_pass().tm)
Beispiel #7
0
    def test_test_null_values_class(self):
        self.assertTrue(hasattr(self.tnv1, "td"))
        self.assertEqual(self.tnv1.ti, test_pass().ti)
        self.assertEqual(self.tnv1.tm, test_pass().tm)

        self.assertTrue(hasattr(self.tnv2, "td"))
        self.assertEqual(self.tnv2.ti, test_fail("blah").ti)
        self.assertNotEqual(self.tnv2.tm, test_pass().tm)
Beispiel #8
0
    def test_test_expc_cols(self):
        self.assertTrue(hasattr(self.tec1, "td"))
        self.assertEqual(self.tec1.ti, test_pass().ti)
        self.assertEqual(self.tec1.tm, test_pass().tm)

        self.assertTrue(hasattr(self.tec2, "td"))
        self.assertEqual(self.tec2.ti, test_fail("blah").ti)
        self.assertNotEqual(self.tec2.tm, test_pass().tm)

        self.assertTrue(hasattr(self.tec3, "td"))
        self.assertEqual(self.tec3.ti, test_pass().ti)
        self.assertEqual(self.tec3.tm, test_pass().tm)
Beispiel #9
0
    def test_test_expc_values_class(self):
        self.assertTrue(hasattr(self.tv1, "td"))
        self.assertEqual(self.tv1.ti, test_pass().ti)
        self.assertEqual(self.tv1.tm, test_pass().tm)

        self.assertTrue(hasattr(self.tv2, "td"))
        self.assertEqual(self.tv2.ti, test_pass().ti)
        self.assertEqual(self.tv2.tm, test_pass().tm)

        self.assertTrue(hasattr(self.tv3, "td"))
        self.assertEqual(self.tv3.ti, test_fail("blah").ti)
        self.assertNotEqual(self.tv3.tm, test_pass().tm)

        self.assertTrue(hasattr(self.tv4, "td"))
        self.assertEqual(self.tv4.ti, test_pass().ti)
        self.assertEqual(self.tv4.tm, test_pass().tm)

        self.assertTrue(hasattr(self.tv5, "td"))
        self.assertEqual(self.tv5.ti, test_pass().ti)
        self.assertEqual(self.tv5.tm, test_pass().tm)

        self.assertTrue(hasattr(self.tv6, "td"))
        self.assertEqual(self.tv6.ti, test_fail("blah").ti)
        self.assertNotEqual(self.tv6.tm, test_pass().tm)
    def test_test_gte_value_class(self):
        self.assertTrue(hasattr(self.tgtev1, "td"))
        self.assertEqual(self.tgtev1.ti, test_pass().ti)
        self.assertEqual(self.tgtev1.tm, test_pass().tm)

        self.assertTrue(hasattr(self.tgtev2, "td"))
        self.assertEqual(self.tgtev2.ti, test_pass().ti)
        self.assertEqual(self.tgtev2.tm, test_pass().tm)

        self.assertTrue(hasattr(self.tgtev3, "td"))
        self.assertEqual(self.tgtev3.ti, test_fail("blah").ti)
        self.assertNotEqual(self.tgtev3.tm, test_pass().tm)

        self.assertTrue(hasattr(self.tgtev4, "td"))
        self.assertEqual(self.tgtev4.ti, test_pass().ti)
        self.assertEqual(self.tgtev4.tm, test_pass().tm)

        self.assertTrue(hasattr(self.tgtev5, "td"))
        self.assertEqual(self.tgtev5.ti, test_pass().ti)
        self.assertEqual(self.tgtev5.tm, test_pass().tm)

        self.assertTrue(hasattr(self.tgtev6, "td"))
        self.assertEqual(self.tgtev6.ti, test_fail("blah").ti)
        self.assertNotEqual(self.tgtev6.tm, test_pass().tm)
Beispiel #11
0
    def __init__(self, *args, **kwargs):

        super(UtilsTestClass, self).__init__(*args, **kwargs)

        self.df_dct = {"col1": [1,2,3,4],
                       "col2": ["a", "b", "c", "d"]}

        self.df = pd.DataFrame(self.df_dct)

        self.tp_ti = test_pass_ti()
        self.tw_ti = test_warn_ti()
        self.tf_ti = test_fail_ti()

        self.tp_tm = test_pass_tm()
        self.tw_tm = test_warn_tm(tm = "blah")
        self.tf_tm = test_fail_tm(tm = "blah")

        self.tp = test_pass()
        self.tw = test_warn(tm = "blah")
        self.tf = test_fail(tm = "blah")