• 
      

    Fix up API tests to handle 2-to-3 conversion.

    Review Request #6674 — Created Dec. 4, 2014 and submitted

    Information

    RBTools
    master
    3879692...

    Reviewers

    Fix up API tests to handle 2-to-3 conversion.

    This change makes a couple changes to the API interface tests. The first is a
    change to use six.iteritems when iterating over a dict (since Python 3.x
    doesn't have an iteritems() method on dict itself). The second fixes the type
    that we're passing into setlocale() to make it work correctly with both Python
    2.x and 3.x.

    Ran unit tests.

    Description From Last Updated

    This is a 3rd-party module. Blank line before it.

    chipx86 chipx86

    Can't this be b'C'?

    chipx86 chipx86
    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          rbtools/api/tests.py
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          rbtools/api/tests.py
      
      
    2. 
        
    chipx86
    1. 
        
    2. rbtools/api/tests.py (Diff revision 1)
       
       
      Show all issues

      This is a 3rd-party module. Blank line before it.

    3. rbtools/api/tests.py (Diff revision 1)
       
       
      Show all issues

      Can't this be b'C'?

      1. No it can't. On Python 2.x, it compares to typeof(''), which is 'str', but on Python 3.x, it checks for 'str' (which is unicode on 2.x)

    4. 
        
    david
    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          rbtools/api/tests.py
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          rbtools/api/tests.py
      
      
    2. 
        
    chipx86
    1. Ship It!
    2. 
        
    david
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to master (8f291c0)