Exemplo n.º 1
0
    def test_match_path_path(self):
        a = make_path("/:NXentry/:NXinstrument/:NXdetector")
        b = make_path("/scan_1:NXentry/p08:NXinstrument/mythen:NXdetector")
        self.assertTrue(match(a,b))

        b.pop_front()
        self.assertTrue(not match(a,b))
        b.push_front("/")
        b.pop_back()
        self.assertTrue(not match(a,b))
Exemplo n.º 2
0
    def test_match(self):
        self.assertTrue(match(make_path("/:NXentry/:NXinstrument/:NXdetector"),
                              make_path("/scan_1:NXentry/p08:NXinstrument/mythen:NXdetector")))

        self.assertTrue(match("/:NXentry/:NXinstrument/:NXdetector",
                              "/scan_1:NXentry/p08:NXinstrument/mythen:NXdetector"))