From 3461b982e4a2d25d2b9d728bd06366ff6d875dc4 Mon Sep 17 00:00:00 2001 From: Julian Dolby Date: Mon, 15 Feb 2021 19:45:06 -0500 Subject: [PATCH] test files --- com.ibm.wala.cast.python.test/data/np_shim.py | 1 + .../data/pandas_shim.py | 33 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 com.ibm.wala.cast.python.test/data/np_shim.py create mode 100644 com.ibm.wala.cast.python.test/data/pandas_shim.py diff --git a/com.ibm.wala.cast.python.test/data/np_shim.py b/com.ibm.wala.cast.python.test/data/np_shim.py new file mode 100644 index 000000000..19fe7d8a3 --- /dev/null +++ b/com.ibm.wala.cast.python.test/data/np_shim.py @@ -0,0 +1 @@ +nan = -1 diff --git a/com.ibm.wala.cast.python.test/data/pandas_shim.py b/com.ibm.wala.cast.python.test/data/pandas_shim.py new file mode 100644 index 000000000..8d9b53d57 --- /dev/null +++ b/com.ibm.wala.cast.python.test/data/pandas_shim.py @@ -0,0 +1,33 @@ +def isnull(x): + return False; + +class DataFrame(): + def __init__(self, x): + self.x = x + + def to_html(self, border=None): + return self.x + +class Series(): + def __init__(self, x): + self.x = x + + def sum(): + return 0 + +class Categorical(): + def __init__(self, x): + self.dtype = "type" + +class DecimalArrayWithoutFromSequence(): + def foo(self): + print('a') + +class DecimalArrayWithoutCoercion(): + def foo(self): + print('b') + +class MultiIndex(): + @staticmethod + def from_tuples(a, names): + return a