Changeset 13500


Ignore:
Timestamp:
Sep 16, 2019 3:46:50 PM (3 months ago)
Author:
randersson
Message:

#5819 Removed empty lines from bottom of test file. Added back the conditional expressions into the class constructors that was first added in r13494 but removed in r13495. Reason is that it made the tests pass and perhaps an alternate solution can be implemented later.

Location:
branches/dev-5819/Python/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/dev-5819/Python/src/pyjmi/log/tree.py

    r13495 r13500  
    2929    """
    3030    def __init__(self, text):
    31         # TODO: Do we really need this assert? It breaks py3 compatibility
    32         #assert isinstance(text, basestring)
     31        assert isinstance(text, str if version_info > (3, 0) else basestring)
    3332        self.text = text
    3433
     
    4443    """
    4544
    46     def __init__(self, type):
    47         # TODO: Do we really need this assert? It breaks py3 compatibility
    48         #assert isinstance(type, basestring)
    49         self.type  = type
     45    def __init__(self, node_type):
     46        assert isinstance(node_type, str if version_info > (3, 0) else basestring)
     47        self.type  = node_type
    5048        self.nodes = []
    5149        self.keys  = []
  • branches/dev-5819/Python/src/tests_jmodelica/initialization/test_KINsolver_options.py

    r13483 r13500  
    342342        err_msg = "Arrays are not almost equal:\nEXPECTED: {}\nACTUAL: {}".format(expected, result)
    343343        N.testing.assert_array_almost_equal(result, expected, err_msg=err_msg)
    344        
    345    
    346        
    347        
    348        
    349        
    350        
    351        
    352        
    353 
Note: See TracChangeset for help on using the changeset viewer.