1. Mike Miller
  2. pytave
  3. Pull requests

Pull requests

#32 Merged at 77af526
Deleted repository
default (72ecb31b163a)

Fix some pyobject doctests

  1. Abhinav Tripathi
  • @pyobject/dummy.m: Fix tests to work for both python2 and python3 taking into account the latest changes in pytave to drop conversion of lists, dicts & tuples

Comments (10)

  1. Mike Miller repo owner

    Here are the test failures I get with Python 3.5 with this patch applied:

       >> sort (methods (g))
          expected:    ans =
          [1,1] = bit_length
          [2,1] = conjugate
          got     : ans = 
      [1,1] = bit_length
      [2,1] = conjugate
      [3,1] = from_bytes
      [4,1] = to_bytes
       >> x.keys ()
          expected:    ans = [pyobject ...]
          ['two', 'one']
          got     : ans = [pyobject 0x7fe43765c558]
      dict_keys(['two', 'one'])
       >> methods pyobject
          expected:    Methods for class pyobject:
       display     dummy       fieldnames  methods     pyobject    struct      subsasgn    subsref
          got     : Methods for class pyobject:
    display     fieldnames  pyobject    subsasgn
    dummy       methods     struct      subsref

    Needs work.

    1. Mike Miller repo owner

      Also note that the test in pyeval.cc is failing similarly to the x.keys() doctest failing above:

         >> pyeval ("dict(one=1, two=2)")
            expected:    scalar structure containing the fields:
            two =  2
            one =  1
            got     : ans = [pyobject 0x7f62b1d671c8]
        {'one': 1, 'two': 2}
  2. Abhinav Tripathi author

    I have updated the PR to take into account the changes that you said. Also I could not find the failing test in pyeval that you mentioned!

    And weirdly, bitbucket did not allow me to send this PR to the @ bookmark. I had to send this to the pyargs bookmark...