473,842 Members | 1,603 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

pyunit and Eclipse

I was working with a friend on a project Monday night, and tried to run a
pyunit test from Eclipse, and nothing seemed to happen. We finally figured
out that the test is doing exactly what it's supposed to do, but the pyunit
output isn't making it to the Eclipse console window. We get the same result
if I run the module as a pyunit test using Eclipse, or if we simply have the
program call unittest.main, and run that.

As a workaround, we just ran the tests from a command prompt which worked well
enough, but it would be nice to fix the problem.
Aug 4 '05 #1
1 7798
Steve Jorgensen wrote:
I was working with a friend on a project Monday night, and tried to run a
pyunit test from Eclipse, and nothing seemed to happen. We finally figured
out that the test is doing exactly what it's supposed to do, but the pyunit
output isn't making it to the Eclipse console window. We get the same result
if I run the module as a pyunit test using Eclipse, or if we simply have the
program call unittest.main, and run that.

As a workaround, we just ran the tests from a command prompt which worked well
enough, but it would be nice to fix the problem.

Which pydev version? How did you do the run?

Guessing those...

Just a single file, yes, it would be just unittest.main() ...

Anyway, there is an issue in Eclipse (happens in java too) that is the
following: if you do a run and it is too fast, sometimes the output does
not show (usually if you re-run it --Ctrl+F11 -- , it works, but not
always).

If you are running the unit-test for a folder, you don't need the
unittest.main() , as it should auto-import the test-cases in the files
below the folder (recursively) and run them.

Cheers,

Fabio

--
Fabio Zadrozny
------------------------------------------------------
Software Developer

ESSS - Engineering Simulation and Scientific Software
www.esss.com.br

PyDev - Python Development Enviroment for Eclipse
pydev.sf.net
pydev.blogspot. com
Aug 4 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2182
by: could ildg | last post by:
I want to know something about unittest these days, and since I'm learning python, I want to touch it through python. But when I found the newest pyunit is even so old, I wonder if it is still usable for current python version 2.4. Will you please tell me? Thank you. What are the advantages and disadvantages of unittest? Can somebody give me a detailed listing?
2
2121
by: chris | last post by:
We have a number of TestCase classes that have multiple test methods. We are interested in removing any of the individual test methods on the fly (dynamically, at runtime, whatever). We currently have an "isSupported" method in the TestCase classes that return a bool by which the greater test harness decides whether to run the enclosed test methods or not. We would like to have per-test-method granularity, however, for essentially...
1
2002
by: travislspencer | last post by:
Hey All, I am trying to write a script that runs all of my pyunit tests for me. Ideally, I would like to be able to drop a new module into my project's test subdirectory, and the testing script will pick it up automatically. At the moment, I have it working but it is kinda a kludge because every TestCase must provide a function that returns a TestSuite for all of its tests.
5
3557
by: Sakcee | last post by:
Hi I am trying to use pyUnit to create a framework for testing functions I am reading function name, expected output, from a text file. and in python generating dynamic test functions something like this class getUsStatesTest( unittest.TestCase ):
2
2808
by: volcano | last post by:
I am desperately looking for an info how to combine a testing application with decent GUI interface - the way most xUnits do. I believe I have seen something about using Tkinter, but I do not remember - where. I am working on a complex testing application built over unittest module, and I need GUI interface that will alllow me to select tests at different levels of test hierarchy tree. I am new to python, so say everything slow and repeat...
0
1077
by: winston.yang | last post by:
Is it possible to use PyUnit to test with multiple threads? I want to send many commands to a database at the same time. The order of execution of the commands is indeterminate, and therefore, so is the status message returned. For example, say that I send the commands "get" and "delete" for a given record to the database at the same time. If the get executes before the delete, I expect a success message (assuming that the record...
0
2004
by: Husey | last post by:
Hi, I am trying to create a very simple EJB project which requires me to create a new jboss configuration in Eclipse. I keep getting the error message "An error has occurred. See error log for more details". Same for all versions of JBoss. I couldn't find what causes the error. Any help would be much appreciated. My installation is: JDK 1.5.0 update 11 Jboss 4.0.4GA Eclipse 3.2.2
16
10773
by: Ananthu | last post by:
Hi I dont know how to connect mysql with ECLIPSE in RCP application. Please send me the sample code of connecting mysql sever with ECLIPSE in RCP application. Coding Part: RCP Application Codes: Class ApplicationActionBarAdvisor:
3
6775
by: ravit | last post by:
Hello All, I am trying to execute an application that is developed using eclipse libraries. Jface, SWT , etc. While I execute the application , i have received an exception which I am unable to trace it. TextViewer.setSelection(100,true); is the statement whre it araised. TextViewer is org.eclipse.jface.text.SourceViewer object.
0
9717
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10677
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10318
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9457
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7862
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7045
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5699
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4504
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4094
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.