def assertResult(self, result, circuit):
    'Fetches the QASM in circuit.name file and compares it with result.'
    qasm_name = ('%s_%s.qasm' % (type(self).__name__, circuit.name))
    filename = os.path.join(DIRNAME, qasm_name)
    if self.regenerate_expected:
        self.generate_ground_truth(result, filename)
    expected = QuantumCircuit.from_qasm_file(filename)
    self.assertEqual(result, expected)
Fetches the QASM in circuit.name file and compares it with result.
def assertResult(self, result, circuit):
    
    qasm_name = ('%s_%s.qasm' % (type(self).__name__, circuit.name))
    filename = os.path.join(DIRNAME, qasm_name)
    if self.regenerate_expected:
        self.generate_ground_truth(result, filename)
    expected = QuantumCircuit.from_qasm_file(filename)
    self.assertEqual(result, expected)