File: test1.py

package info (click to toggle)
python-memprof 0.3.6-5.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 252 kB
  • sloc: python: 345; sh: 7; makefile: 4
file content (30 lines) | stat: -rw-r--r-- 992 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Copyright (c) 2013 Javi Merino
#
# This file is part of memprof.
#
# memprof is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation (version 3 of the License only).
#
# memprof is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with memprof.  If not, see <http://www.gnu.org/licenses/>.

import unittest
import os
import sys


class Test(unittest.TestCase):
    # Rough test: just run the example
    def test_demo(self):
        root = os.getcwd()
        examples_path = os.path.join(os.getcwd(), "examples")
        sys.path.append(examples_path)
        os.chdir(examples_path)
        import demo  # noqa
        os.chdir(root)