1. 19 Sep, 2016 1 commit
  2. 11 Sep, 2016 1 commit
    • Jason Rhinelander's avatar
      Added a test to detect invalid RTTI caching · 0e489777
      Jason Rhinelander authored
      The current inheritance testing isn't sufficient to detect a cache
      failure; the test added here breaks PR #390, which caches the
      run-time-determined return type the first time a function is called,
      then reuses that cached type even though the run-time type could be
      different for a future call.
      0e489777
  3. 07 Sep, 2016 1 commit
    • Jason Rhinelander's avatar
      Allow passing base types as a template parameter · 6b52c838
      Jason Rhinelander authored
      This allows a slightly cleaner base type specification of:
      
          py::class_<Type, Base>("Type")
      
      as an alternative to
      
          py::class_<Type>("Type", py::base<Base>())
      
      As with the other template parameters, the order relative to the holder
      or trampoline types doesn't matter.
      
      This also includes a compile-time assertion failure if attempting to
      specify more than one base class (but is easily extendible to support
      multiple inheritance, someday, by updating the class_selector::set_bases
      function to set multiple bases).
      6b52c838
  4. 19 Aug, 2016 2 commits
    • Dean Moldovan's avatar
      382db5b2
    • Dean Moldovan's avatar
      Port tests to pytest · a0c1ccf0
      Dean Moldovan authored
      Use simple asserts and pytest's powerful introspection to make testing
      simpler. This merges the old .py/.ref file pairs into simple .py files
      where the expected values are right next to the code being tested.
      
      This commit does not touch the C++ part of the code and replicates the
      Python tests exactly like the old .ref-file-based approach.
      a0c1ccf0