Example #1
0
 def test_custom_move_attribute(self):
     attr = six.MovedAttribute("spam", "six", "six", "u", "u")
     six.add_move(attr)
     six.remove_move("spam")
     assert not hasattr(six.moves, "spam")
     attr = six.MovedAttribute("spam", "six", "six", "u", "u")
     six.add_move(attr)
     from six.moves import spam
     assert spam is six.u
     six.remove_move("spam")
     assert not hasattr(six.moves, "spam")
Example #2
0
 def test_custom_move_attribute(self):
     attr = six.MovedAttribute("spam", "six", "six", "u", "u")
     six.add_move(attr)
     six.remove_move("spam")
     assert not hasattr(six.moves, "spam")
     attr = six.MovedAttribute("spam", "six", "six", "u", "u")
     six.add_move(attr)
     from six.moves import spam
     assert spam is six.u
     six.remove_move("spam")
     assert not hasattr(six.moves, "spam")
Example #3
0
 def test_custom_move_module(self):
     attr = six.MovedModule("spam", "six", "six")
     six.add_move(attr)
     six.remove_move("spam")
     assert not hasattr(six.moves, "spam")
     attr = six.MovedModule("spam", "six", "six")
     six.add_move(attr)
     from six.moves import spam
     assert spam is six
     six.remove_move("spam")
     assert not hasattr(six.moves, "spam")
Example #4
0
 def test_custom_move_module(self):
     attr = six.MovedModule("spam", "six", "six")
     six.add_move(attr)
     six.remove_move("spam")
     assert not hasattr(six.moves, "spam")
     attr = six.MovedModule("spam", "six", "six")
     six.add_move(attr)
     from six.moves import spam
     assert spam is six
     six.remove_move("spam")
     assert not hasattr(six.moves, "spam")
Example #5
0
 def test_custom_move_attribute(self):
     attr = six.MovedAttribute('spam', 'six', 'six', 'u', 'u')
     six.add_move(attr)
     six.remove_move('spam')
     assert not hasattr(six.moves, 'spam')
     attr = six.MovedAttribute('spam', 'six', 'six', 'u', 'u')
     six.add_move(attr)
     from six.moves import spam
     assert spam is six.u
     six.remove_move('spam')
     assert not hasattr(six.moves, 'spam')
Example #6
0
 def test_custom_move_module(self):
     attr = six.MovedModule('spam', 'six', 'six')
     six.add_move(attr)
     six.remove_move('spam')
     assert not hasattr(six.moves, 'spam')
     attr = six.MovedModule('spam', 'six', 'six')
     six.add_move(attr)
     from six.moves import spam
     assert spam is six
     six.remove_move('spam')
     assert not hasattr(six.moves, 'spam')
Example #7
0
 def test_custom_move_attribute(self):
     attr = six.MovedAttribute('spam', 'six', 'six', 'u', 'u')
     six.add_move(attr)
     six.remove_move('spam')
     assert not hasattr(six.moves, 'spam')
     attr = six.MovedAttribute('spam', 'six', 'six', 'u', 'u')
     six.add_move(attr)
     from six.moves import spam
     assert spam is six.u
     six.remove_move('spam')
     assert not hasattr(six.moves, 'spam')
Example #8
0
 def test_custom_move_module(self):
     attr = six.MovedModule('spam', 'six', 'six')
     six.add_move(attr)
     six.remove_move('spam')
     assert not hasattr(six.moves, 'spam')
     attr = six.MovedModule('spam', 'six', 'six')
     six.add_move(attr)
     from six.moves import spam
     assert spam is six
     six.remove_move('spam')
     assert not hasattr(six.moves, 'spam')