Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Tests in multiple directories need to be run from within their own directory
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jay Doane  
View profile  
 More options Oct 13 2010, 7:09 pm
From: Jay Doane <jay.s.do...@gmail.com>
Date: Wed, 13 Oct 2010 16:09:14 -0700 (PDT)
Local: Wed, Oct 13 2010 7:09 pm
Subject: Tests in multiple directories need to be run from within their own directory
I have been using nose from within a python script to execute tests in
a different directory.  Somewhat simplified:

import nose

def main():
    testfiles = 'install_plan.py, json_metadata_utils.py, library.py'
    where = '../build_output/fc/foobar.app/Contents/Frameworks/
install'
    argv=['--verbosity=0', '--with-doctest', '--where=%s'%where, '--
tests=%s'%testfiles]
    nose.main(argv=argv)

if __name__ == '__main__':
    main()

And this works fine.

However, now I need to add another test file, but it is in a different
directory than "where" above.  I've tried several things to no avail,
and the problem always seems to stem from the need to have multiple
different working directories at various times during test execution.

Also, I don't want to break the testing up into multiple nose runs
(ahem) because I'm using nose to aggregate the results into a single
xml file.

Can someone suggest options to solve this problem?

Thanks,
Jay


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tim Hatch  
View profile  
 More options Oct 13 2010, 7:20 pm
From: Tim Hatch <t...@timhatch.com>
Date: Wed, 13 Oct 2010 16:20:59 -0700
Local: Wed, Oct 13 2010 7:20 pm
Subject: Re: [nose-users] Tests in multiple directories need to be run from within their own directory

> However, now I need to add another test file, but it is in a different
> directory than "where" above.  I've tried several things to no avail,
> and the problem always seems to stem from the need to have multiple
> different working directories at various times during test execution.

Is it possible to specify a parent of the two different wheres as the
real where, then rely on the test-detection logic to only find the right
files?  Is the second where relying on its files being in a certain
package, or could you use a symlink to put it inside the first?

Tim


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jay Doane  
View profile  
 More options Oct 14 2010, 1:25 pm
From: Jay Doane <jay.s.do...@gmail.com>
Date: Thu, 14 Oct 2010 10:25:35 -0700
Local: Thurs, Oct 14 2010 1:25 pm
Subject: Re: [nose-users] Tests in multiple directories need to be run from within their own directory
On Oct 13, 2010, at 4:20 PM, Tim Hatch wrote:

>> However, now I need to add another test file, but it is in a  
>> different
>> directory than "where" above.  I've tried several things to no avail,
>> and the problem always seems to stem from the need to have multiple
>> different working directories at various times during test execution.

> Is it possible to specify a parent of the two different wheres as the
> real where, then rely on the test-detection logic to only find the  
> right
> files?

I need to be able to specify exactly the directories/files nose should  
be looking in, and not use test detection.

Ideally, I would be able to pass nose a list of (working_dir,  
testfile) pairs to be run.

Would that mean writing a new TestLoader?  Or does the current  
assumption of a single working directory pervade the entirety of nose?

> Is the second where relying on its files being in a certain
> package, or could you use a symlink to put it inside the first?

As it's currently written, the new test file would need to be altered  
if it gets moved/symlinked.

It may be that I need to make it a bit more adaptable, however.

Thanks for the response!

Jay


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »