

from base import jsonrpyc


class MyClass(object):

    def one(self):
        return 1

    def twice(self, n):
        return n * 2

    def arglen(self, *args, **kwargs):
        return len(args) + len(kwargs)


if __name__ == "__main__":
    rpc = jsonrpyc.RPC(MyClass())



import os
import sys

base = os.path.dirname(os.path.abspath(__file__))
sys.path.append(base)

from base import jsonrpyc


class MyClass(object):

    def one(self):
        return 1

    def twice(self, n):
        return n * 2

    def arglen(self, *args, **kwargs):
        return len(args) + len(kwargs)


if __name__ == "__main__":
    rpc = jsonrpyc.RPC(MyClass())

Fix import in test client.
Fix import in test client.

  
+ 
+ import os
+ import sys
+ 
+ base = os.path.dirname(os.path.abspath(__file__))
+ sys.path.append(base)
  
  from base import jsonrpyc
  
  
  class MyClass(object):
  
      def one(self):
          return 1
  
      def twice(self, n):
          return n * 2
  
      def arglen(self, *args, **kwargs):
          return len(args) + len(kwargs)
  
  
  if __name__ == "__main__":
      rpc = jsonrpyc.RPC(MyClass())
  
Fix import in test client.
## Code Before:


from base import jsonrpyc


class MyClass(object):

    def one(self):
        return 1

    def twice(self, n):
        return n * 2

    def arglen(self, *args, **kwargs):
        return len(args) + len(kwargs)


if __name__ == "__main__":
    rpc = jsonrpyc.RPC(MyClass())

## Instruction:
Fix import in test client.
## Code After:


import os
import sys

base = os.path.dirname(os.path.abspath(__file__))
sys.path.append(base)

from base import jsonrpyc


class MyClass(object):

    def one(self):
        return 1

    def twice(self, n):
        return n * 2

    def arglen(self, *args, **kwargs):
        return len(args) + len(kwargs)


if __name__ == "__main__":
    rpc = jsonrpyc.RPC(MyClass())
