test_extern.py 473 B

1234567891011121314151617181920
  1. import importlib
  2. import pickle
  3. from setuptools import Distribution
  4. from setuptools.extern import ordered_set
  5. def test_reimport_extern():
  6. ordered_set2 = importlib.import_module(ordered_set.__name__)
  7. assert ordered_set is ordered_set2
  8. def test_orderedset_pickle_roundtrip():
  9. o1 = ordered_set.OrderedSet([1, 2, 5])
  10. o2 = pickle.loads(pickle.dumps(o1))
  11. assert o1 == o2
  12. def test_distribution_picklable():
  13. pickle.loads(pickle.dumps(Distribution()))