示例#1
0
    def test_view_as_clustergrammer(self):
        from biokbase.narrative import viewers

        self.assertEqual(
            str(type(viewers.view_as_clustergrammer(self.generic_ref))),
            "<class 'clustergrammer_widget.example.clustergrammer_widget'>",
        )
示例#2
0
 def test_bad_view_as_clustergrammer_params(self):
     from biokbase.narrative import viewers
     with self.assertRaises(AssertionError):
         viewers.view_as_clustergrammer(self.generic_ref, col_categories="Time")
     with self.assertRaises(AssertionError):
         viewers.view_as_clustergrammer(self.generic_ref, row_categories="Time")
     with self.assertRaises(AssertionError):
         viewers.view_as_clustergrammer(self.generic_ref, normalize_on="Time")
     with self.assertRaisesRegexp(ValueError, "not a compatible data type"):
         viewers.view_as_clustergrammer(self.attribute_set_ref)
示例#3
0
    def test_bad_view_as_clustergrammer_params(self):
        from biokbase.narrative import viewers

        with self.assertRaises(AssertionError):
            viewers.view_as_clustergrammer(self.generic_ref, col_categories="Time")
        with self.assertRaises(AssertionError):
            viewers.view_as_clustergrammer(self.generic_ref, row_categories="Time")
        with self.assertRaises(AssertionError):
            viewers.view_as_clustergrammer(self.generic_ref, normalize_on="Time")
        with self.assertRaisesRegex(ValueError, "not a compatible data type"):
            viewers.view_as_clustergrammer(self.attribute_set_ref)
示例#4
0
 def test_view_as_clustergrammer(self):
     from biokbase.narrative import viewers
     self.assertEqual(str(type(viewers.view_as_clustergrammer(self.generic_ref))),
                      "<class 'clustergrammer_widget.example.clustergrammer_widget'>")