test_recycle_generator.py 331 B

1234567891011121314151617
  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. from draugr.python_utilities import recycle
  4. __author__ = "Christian Heider Nielsen"
  5. __doc__ = r"""
  6. Created on 28/10/2019
  7. """
  8. def test_recycle_generator1():
  9. a = range(9)
  10. for i, b in zip(range(18), recycle(a)):
  11. assert b in a
  12. assert i == 17