473,699 Members | 2,628 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

strange permission issue with nosetests

Hi,
I'm trying the nose testing package. I've just started reading the
tutorial and I had a problem with the first simple example.

This is the test:

def test_b():
assert 'b' == 'b'

In the same directory I gave the command nosetests and it runs the test.

Then I try with nosetests -v, but it just says this:

----------------------------------------------------------------------
Ran 0 tests in 0.003s

OK

I thought because I didn't change anything in the file, don't know.
Tried to change, but nothing. I moved on and wrote another test,
inside a class, but nothing. It just doesn't run tests.

Searching on google I found this: http://www.siafoo.net/article/61
He had the same issue and said to change permission of the file to 664.

I tried and it worked.
Is that normal? Why does it happen?
Nov 20 '08 #1
4 2052
Mr.SpOOn <mr********@gma il.comwrites:
Searching on google I found this: http://www.siafoo.net/article/61
He had the same issue and said to change permission of the file to 664.

I tried and it worked.
Is that normal? Why does it happen?
If a file is meant to be run as a command or program, make it
executable. (It would be good to *also* make the file behave well when
imported as a module instead.)

If it's meant to be imported as a module, do *not* make it executable.

Unit test modules, which are primarily meant to be imported and have
the tests collected and *then* run by the unit test framework, should
be non-executable modules. I'm very glad nose enforces this.

--
\ “Humanity has advanced, when it has advanced, not because it |
`\ has been sober, responsible, and cautious, but because it has |
_o__) been playful, rebellious, and immature.” —Tom Robbins |
Ben Finney
Nov 20 '08 #2
On Thu, Nov 20, 2008 at 13:34, Ben Finney
<bi************ ****@benfinney. id.auwrote:
Mr.SpOOn <mr********@gma il.comwrites:
>Searching on google I found this: http://www.siafoo.net/article/61
He had the same issue and said to change permission of the file to 664.

Unit test modules, which are primarily meant to be imported and have
the tests collected and *then* run by the unit test framework, should
be non-executable modules. I'm very glad nose enforces this.
Mmm it seems strange to me. I mean, there isn't any reference to this
on the site. How would one imagine he needs to change permission? And
it is strange that the first time I didn't need to change anything.
Nov 20 '08 #3
Mr.SpOOn <mr********@gma il.comwrites:
Mmm it seems strange to me. I mean, there isn't any reference to this
on the site. How would one imagine he needs to change permission? And
it is strange that the first time I didn't need to change anything.
This seems now to have moved to be more about the specifics of ‘nose’,
rather than about Python. Perhaps it started there. Regardless, it's
probably best to take these questions to a more focused community,
such as the developers themselves.

--
\ “Men never do evil so completely and cheerfully as when they do |
`\ it from religious conviction.” —Blaise Pascal (1623-1662), |
_o__) Pensées, #894. |
Ben Finney
Nov 20 '08 #4
Mr.SpOOn schreef:
On Thu, Nov 20, 2008 at 13:34, Ben Finney
<bi************ ****@benfinney. id.auwrote:
>Mr.SpOOn <mr********@gma il.comwrites:
>>Searching on google I found this: http://www.siafoo.net/article/61
He had the same issue and said to change permission of the file to 664.
Unit test modules, which are primarily meant to be imported and have
the tests collected and *then* run by the unit test framework, should
be non-executable modules. I'm very glad nose enforces this.

Mmm it seems strange to me. I mean, there isn't any reference to this
on the site. How would one imagine he needs to change permission? And
it is strange that the first time I didn't need to change anything.
You can also nosetests --exe; with that option, nose will also include
executable files (see the section "nosetests usage" on the website
(http://somethingaboutorange.com/mrl/...ts/nose/#usage, under
"Options")) .

It took me a while too before I could figure what was wrong, and how to
solve it.

--
The saddest aspect of life right now is that science gathers knowledge
faster than society gathers wisdom.
-- Isaac Asimov

Roel Schroeven
Nov 20 '08 #5

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

Similar topics

11
4415
by: Wayne Wengert | last post by:
I am using VS.NET 2003, VB.NET, ADO.NET and an Access 2000 database. I want to display a list of all tables in an Access database. I want to put that list of table names in a listbox so the user can select the table they want to use. How can I do this? -- ------------------------------------ Wayne Wengert wayne@wengert.org
10
4613
by: Florian G. Pflug | last post by:
Hi I installed a postgres-application (which was developed on debian woody) on red hat 9 today, using the postgres 7.3 rpms from redhad. One of my the triggers uses the pg_settings table (more precisely, it updates that table to change the search_path temporarily). With the postgres 7.3 (and 7.4 too) installed on my debian development system, this worked fine. On redhat 9, however, I get an "pg_settings: permission denied" error when my...
3
3168
by: Don McNamara | last post by:
Hi, I've hit quite a strange problem with XmlSerializer on my W2K3 server. When I serialize/deserialize using an exe on my local computer (XP), everything works fine. When I put the code out on the server (W2K3) it throws an exception. It only seems to happen when serializing/deserializing _arrays_ of a type. If I just serialize/deserialize one instance, it works fine. The exception I get is: (sorry for the word wrapping.)...
1
1226
by: Ricky K. Rasmussen | last post by:
Hi NG, When connecting to a local WebService one of our customers gets a very strange exception: "File or assembly name gaw9eaqv.dll, or one of its dependencies, was not found." The strange part is that the name of the assembly can vary, and has nothing to do with the names of the assemblies used in neither the WebService or the
1
1193
by: Mircea Pleteriu | last post by:
Hi, I've created a test aspnet web application which contains one page only. There is only one label control placed on the page. The text of the label control is set on server side by the PageLoad method. The text is stored into a sattelite assembly. This is the code which sets the text:
4
4498
by: Richard MSL | last post by:
I have a simple application in C++ that uses a dll I wrote in C#. It works fine when I run it on C: on my local PC, but when I attempt to run it on the i: drive on my LAN, it gets a loading permission error, presumably when loading my c# dll. I gather that I must set an attribute in my C++ program to grant security to load the dll, but I can not figure out what to use. Here is my c++ program: #include <stdio.h> #using <csfu.dll>
1
3562
by: doctorhardik | last post by:
other interesting thing i observe during my work which i describe below: i am using dotproject2.0.4 on fc3. it is working fine. but i want to generate pdf file report during this time i face permission denied problem. Warning: fopen(/var/www/html/dotproject/files/temp/temp1.pdf): failed to open stream: Permission denied in /var/www/html/dotproject/modules/projects/reports/tasklogs.php on line 307 Could not open file to save PDF. ...
1
1470
by: Matthew Wilson | last post by:
I'm curious if anyone has ever tried using nosetests along with minimock. I'm trying to get the two to play nice and not making progress. I also wonder if I'm using minimock incorrectly. Here's the code I want to test, saved in a file dtfun.py. class Chicken(object): "I am a chicken."
4
2666
by: xzzy | last post by:
I have a v1.1 web app that works on my local computer. However, running it at the host computer, the following breaks: when a viewer selects a different country, the State dropdown should repopulate with the new country's state/proviences. Running on the host, the dropdown does not repopulate and says 'Permission Denied', I take this to mean that at the host, a viewer does not have permission to put new items in the State dropdown.
0
8685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
8613
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,...
0
9172
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9032
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8880
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
7745
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 projectplanning, coding, testing, and deploymentwithout 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...
0
5869
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();...
1
3054
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
3
2008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.