Hi Petr,

It should be automatically locating a settings_local.py that's provided as
part of Review Board for testing purposes. Can you confirm for me the
version of Review Board you're working with?

What does this show:

python -c 'from reviewboard.cmdline import rbext; print(rbext.__file__)'

Can you show me the full backtrace of the settings_local.py error?

Christian

On Wed, Apr 8, 2020 at 6:05 AM Petr Grenar <grenar.p...@gmail.com> wrote:

> Hello again,
>
> I managed to create a sample extension for my board. Basically, it does
> nothing. I managed to build a package and develop the package. The
> extension is now imported and enabled on my board.
>
> Next, I want to test, if the extension is loaded correctly. I placed a
> print statement to the extension initialization part. Then I tried to write
> a simple unit test for it. I was following the manual and created a simple
> test.py file.  But I didn't quite get where I should put the test folder
> with test files. So I tried to put it into the extension folder. When I
> tried to run rbext test -m extension it finishes with error: Unable to
> import settings_local.py: No module named settings_local.
>
>  I tried to find those files and I found them in reviewboard extensions
> directory in /conf dir. So I moved the test folder directly to the
> reviewboard directory. It ended with the same error.
>
> This is my folders tree:
>
> -/python_2.7.5
>  |->/extension
>    |->/build
>    |->/dist
>    |->/sample_extension
>       |->.extensi-.py.swp
>       |->__init__.py
>       |->__init__.pyc
>       |->extension.py
>       |->extension.pyc
>    |->/sample_egg-info
>    |->/test
>       |->test.py
>    |->setup.py
>  |->reviewboard
> ...
>
> You can see the test.py file attached in the picture as well as the
> extension on my board.
>
> Am I doing it the right way?
>
> --
> Supercharge your Review Board with Power Pack:
> https://www.reviewboard.org/powerpack/
> Want us to host Review Board for you? Check out RBCommons:
> https://rbcommons.com/
> Happy user? Let us know! https://www.reviewboard.org/users/
> ---
> You received this message because you are subscribed to the Google Groups
> "Review Board Community" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to reviewboard+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/reviewboard/de44552f-1489-4437-b607-4fa69c7f5466%40googlegroups.com
> <https://groups.google.com/d/msgid/reviewboard/de44552f-1489-4437-b607-4fa69c7f5466%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Christian Hammond
President/CEO of Beanbag <https://www.beanbaginc.com/>
Makers of Review Board <https://www.reviewboard.org/>

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"Review Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/reviewboard/CAE7VndmZLLW0Tz2W6nH_YADU-JTU9SstUCm9zNA7%2BBkq0kHJag%40mail.gmail.com.

Reply via email to