Browse Source

Convert to Python 3: `iter(C).next()` -> `next(iter(C))`

Alois Mahdal 2 years ago
parent
commit
9d61f7322b
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      tests/test_hoover.py

+ 3
- 3
tests/test_hoover.py View File

509
                 'p': ['a', 'b'],
509
                 'p': ['a', 'b'],
510
                 'd': [False, True]
510
                 'd': [False, True]
511
             }
511
             }
512
-            iter(hoover.Cartman(source, scheme)).next()
512
+            next(iter(hoover.Cartman(source, scheme)))
513
 
513
 
514
         self.assertRaises(ValueError, fn)
514
         self.assertRaises(ValueError, fn)
515
 
515
 
529
                 'p': ['a', 'b'],
529
                 'p': ['a', 'b'],
530
                 'd': [False, True]
530
                 'd': [False, True]
531
             }
531
             }
532
-            iter(hoover.Cartman(source, scheme)).next()
532
+            next(iter(hoover.Cartman(source, scheme)))
533
 
533
 
534
         self.assertRaises(ValueError, fn)
534
         self.assertRaises(ValueError, fn)
535
 
535
 
544
                 'c': a_mark
544
                 'c': a_mark
545
             }
545
             }
546
             source = dict.fromkeys(scheme, [])
546
             source = dict.fromkeys(scheme, [])
547
-            iter(hoover.Cartman(source, scheme)).next()
547
+            next(iter(hoover.Cartman(source, scheme)))
548
 
548
 
549
         self.assertRaises(ValueError, fn)
549
         self.assertRaises(ValueError, fn)
550
 
550