473,401 Members | 2,125 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

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 2039
Mr.SpOOn <mr********@gmail.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********@gmail.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********@gmail.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********@gmail.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
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...
10
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...
3
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...
1
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...
1
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...
4
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...
1
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...
1
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. ...
4
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
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...
0
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,...
0
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...
0
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...
0
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,...

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.