Exemplo n.º 1
0
 def test_comparisons(self):
     """URLWrappers are sorted by name
     """
     wrapper_a = URLWrapper(name="first", settings={})
     wrapper_b = URLWrapper(name="last", settings={})
     self.assertFalse(wrapper_a > wrapper_b)
     self.assertFalse(wrapper_a >= wrapper_b)
     self.assertFalse(wrapper_a == wrapper_b)
     self.assertTrue(wrapper_a != wrapper_b)
     self.assertTrue(wrapper_a <= wrapper_b)
     self.assertTrue(wrapper_a < wrapper_b)
     wrapper_b.name = "first"
     self.assertFalse(wrapper_a > wrapper_b)
     self.assertTrue(wrapper_a >= wrapper_b)
     self.assertTrue(wrapper_a == wrapper_b)
     self.assertFalse(wrapper_a != wrapper_b)
     self.assertTrue(wrapper_a <= wrapper_b)
     self.assertFalse(wrapper_a < wrapper_b)
     wrapper_a.name = "last"
     self.assertTrue(wrapper_a > wrapper_b)
     self.assertTrue(wrapper_a >= wrapper_b)
     self.assertFalse(wrapper_a == wrapper_b)
     self.assertTrue(wrapper_a != wrapper_b)
     self.assertFalse(wrapper_a <= wrapper_b)
     self.assertFalse(wrapper_a < wrapper_b)
Exemplo n.º 2
0
 def test_comparisons(self):
     """URLWrappers are sorted by name
     """
     wrapper_a = URLWrapper(name='first', settings={})
     wrapper_b = URLWrapper(name='last', settings={})
     self.assertFalse(wrapper_a > wrapper_b)
     self.assertFalse(wrapper_a >= wrapper_b)
     self.assertFalse(wrapper_a == wrapper_b)
     self.assertTrue(wrapper_a != wrapper_b)
     self.assertTrue(wrapper_a <= wrapper_b)
     self.assertTrue(wrapper_a < wrapper_b)
     wrapper_b.name = 'first'
     self.assertFalse(wrapper_a > wrapper_b)
     self.assertTrue(wrapper_a >= wrapper_b)
     self.assertTrue(wrapper_a == wrapper_b)
     self.assertFalse(wrapper_a != wrapper_b)
     self.assertTrue(wrapper_a <= wrapper_b)
     self.assertFalse(wrapper_a < wrapper_b)
     wrapper_a.name = 'last'
     self.assertTrue(wrapper_a > wrapper_b)
     self.assertTrue(wrapper_a >= wrapper_b)
     self.assertFalse(wrapper_a == wrapper_b)
     self.assertTrue(wrapper_a != wrapper_b)
     self.assertFalse(wrapper_a <= wrapper_b)
     self.assertFalse(wrapper_a < wrapper_b)
Exemplo n.º 3
0
 def test_comparisons(self):
     # URLWrappers are sorted by name
     wrapper_a = URLWrapper(name='first', settings={})
     wrapper_b = URLWrapper(name='last', settings={})
     self.assertFalse(wrapper_a > wrapper_b)
     self.assertFalse(wrapper_a >= wrapper_b)
     self.assertFalse(wrapper_a == wrapper_b)
     self.assertTrue(wrapper_a != wrapper_b)
     self.assertTrue(wrapper_a <= wrapper_b)
     self.assertTrue(wrapper_a < wrapper_b)
     wrapper_b.name = 'first'
     self.assertFalse(wrapper_a > wrapper_b)
     self.assertTrue(wrapper_a >= wrapper_b)
     self.assertTrue(wrapper_a == wrapper_b)
     self.assertFalse(wrapper_a != wrapper_b)
     self.assertTrue(wrapper_a <= wrapper_b)
     self.assertFalse(wrapper_a < wrapper_b)
     wrapper_a.name = 'last'
     self.assertTrue(wrapper_a > wrapper_b)
     self.assertTrue(wrapper_a >= wrapper_b)
     self.assertFalse(wrapper_a == wrapper_b)
     self.assertTrue(wrapper_a != wrapper_b)
     self.assertFalse(wrapper_a <= wrapper_b)
     self.assertFalse(wrapper_a < wrapper_b)