Skip to content

Commit 73efc7c

Browse files
committed
Reorganize TestRPlot
1 parent 8d5319f commit 73efc7c

File tree

1 file changed

+7
-15
lines changed

1 file changed

+7
-15
lines changed

pandas/tests/test_rplot.py

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -223,44 +223,36 @@ def test_scale_overflow(self):
223223
for index in range(len(self.data)):
224224
self.scale2(self.data, index)
225225

226-
class TestRPlot1(unittest.TestCase):
227-
def setUp(self):
226+
class TestRPlot(unittest.TestCase):
227+
def test_rplot1(self):
228228
path = os.path.join(curpath(), 'data/tips.csv')
229+
plt.figure()
229230
self.data = read_csv(path, sep=',')
230231
self.plot = rplot.RPlot(self.data, x='tip', y='total_bill')
231232
self.plot + rplot.TrellisGrid(['sex', 'smoker'])
232233
self.plot + rplot.GeomPoint(colour=rplot.ScaleRandomColour('day'), shape=rplot.ScaleShape('size'))
233234
self.fig = plt.gcf()
234235
self.plot.render(self.fig)
235236

236-
def test_subplots(self):
237-
pass
238-
239-
class TestRPlot2(unittest.TestCase):
240-
def setUp(self):
237+
def test_rplot2(self):
241238
path = os.path.join(curpath(), 'data/tips.csv')
239+
plt.figure()
242240
self.data = read_csv(path, sep=',')
243241
self.plot = rplot.RPlot(self.data, x='tip', y='total_bill')
244242
self.plot + rplot.TrellisGrid(['.', 'smoker'])
245243
self.plot + rplot.GeomPoint(colour=rplot.ScaleRandomColour('day'), shape=rplot.ScaleShape('size'))
246244
self.fig = plt.gcf()
247245
self.plot.render(self.fig)
248246

249-
def test_subplots(self):
250-
pass
251-
252-
class TestRPlot3(unittest.TestCase):
253-
def setUp(self):
247+
def test_rplot3(self):
254248
path = os.path.join(curpath(), 'data/tips.csv')
249+
plt.figure()
255250
self.data = read_csv(path, sep=',')
256251
self.plot = rplot.RPlot(self.data, x='tip', y='total_bill')
257252
self.plot + rplot.TrellisGrid(['sex', '.'])
258253
self.plot + rplot.GeomPoint(colour=rplot.ScaleRandomColour('day'), shape=rplot.ScaleShape('size'))
259254
self.fig = plt.gcf()
260255
self.plot.render(self.fig)
261256

262-
def test_subplots(self):
263-
pass
264-
265257
if __name__ == '__main__':
266258
unittest.main()

0 commit comments

Comments
 (0)